Jump to content
Sign in to follow this  
granQ

Ai and "player" doesnt' use same animation?

Recommended Posts

Shar have made a custom animation for one of our heavy machine guns, (not the one showed at picture but i use it for code test). Problem is that when the gets in the machine gun they get into the custom animation (prone one) but when i do it my guy keep standing up.

ai.jpg

Ai in machine gun

me.jpg

and me.

the code is:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgVehicleActions

{

SFPTKSPlgunner = "SFPTKSPlgunner";

};

class CfgMovesMC

{

class Default {};

class DefaultDie: Default {};

class States

{

class Driver: Default {};

#define VEH_DIE_CONN(Name,anim,time) \

class Name##Dying: DefaultDie \

{ \

actions = NoActions; \

file=anim##smrt.rtm; \

speed=-time; \

looped=false; \

soundEnabled=false; \

connectFrom[]={Name,1}; \

}; \

class Name##Dead: Name##Dying \

{ \

actions = DeadActions; \

file=anim##smrt2.rtm; \

speed=SPEED_STATIC; \

terminal = true; \

connectFrom[]={Name##Dying,1}; \

connectTo[]={DeadState,1}; \

}

#define VEHIN_MOVES_VAR(Name,anim,vartime) \

class Name: Driver \

{ \

file=anim##stat.rtm; \

speed=SPEED_STATIC; \

looped=true; \

variantsAI[]= {Name##V1,0.7,Name};\

interpolateWith[]={Name##V1,0.5};\

equivalentTo=Name; \

interpolationSpeed=1; \

connectTo[]={Name##Dying,1}; \

} \

class Name##V1: Name \

{ \

file=anim.rtm; \

speed=-vartime; \

looped=true; \

}

#define VEH_MOVES_VAR(Name,anim,time,vartime) \

VEHIN_MOVES_VAR(Name,anim,vartime); \

VEH_DIE_CONN(Name,anim,time)

VEH_MOVES_VAR(SFPTKSPlgunner, \sfp_tksp\SFPTKSPlgunner, 1, 4);

};

};

<span id='postcolor'>

Share this post


Link to post
Share on other sites

Make sure in the MG config that the

gunnerInAction="blah"

AND

gunnerAction="blah"

are both set, and set the correct animation

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×