Jump to content
Sign in to follow this  
muni

more than 1 animation

Recommended Posts

Ok 'ere we go I can make a unit perform an animation with a trigger for instance or with a waypoint

e.g.

guard switchMove "CtsPercMstpSnonWnonDnon_idle33rejpaniVzadku";

how can I make him do all these?

guard switchMove "c7a_bravoTOerc_idle24, c7a_bravoTleskani_idle3, c7a_bravoTleskani_idle4, c7a_bravoTleskaniTOerc ,c7a_bravo_dovadeni5,c5calming_apc";

THX FOR YOUR TIME :yay:

Share this post


Link to post
Share on other sites

You'll have to put them in a script with a sleep command between each animation. For example:

guard switchMove "CtsPercMstpSnonWnonDnon_idle33rejpaniVzadku"; 

sleep 10; (however long the animation lasts or for how long you want him to play the animation)

guard switchMove "c7a_bravoTOerc_idle24"; 

Share this post


Link to post
Share on other sites

do you mean all of these one by one?

in that case i would use a script, something like:

Initline unit/waypoint/trigger:

nul=[guard] execVM "anim.sqf";

anim.sqf:

_guard = _this select 0;

_guard playMove "CtsPercMstpSnonWnonDnon_idle33rejpaniVzadku"; 
sleep 0.2;
waitUntil { ((animationState _guard) != "CtsPercMstpSnonWnonDnon_idle33rejpaniVzadku") };
_guard playMove "c7a_bravoTOerc_idle24"; 
sleep 0.2;
waitUntil { ((animationState _guard) != "c7a_bravoTOerc_idle24") };
_guard playMove "c7a_bravoTleskani_idle3"; 
sleep 0.2;
waitUntil { ((animationState _guard) != "c7a_bravoTleskani_idle3") };
_guard playMove "c7a_bravoTleskani_idle4"; 
sleep 0.2;
waitUntil { ((animationState _guard) != "c7a_bravoTleskani_idle4") };
_guard playMove "c7a_bravoTleskaniTOerc"; 
sleep 0.2;
waitUntil { ((animationState _guard) != "c7a_bravoTleskaniTOerc") };
_guard playMove "c7a_bravo_dovadeni5"; 
sleep 0.2;
waitUntil { ((animationState _guard) != "c7a_bravo_dovadeni5") };
_guard playMove "c5calming_apc"; 
sleep 0.2;
waitUntil { ((animationState _guard) != "c5calming_apc") };

€: ups, too slow, 2nd Ranger already posted

Share this post


Link to post
Share on other sites

thank you both I look into it.

Share this post


Link to post
Share on other sites

What smartgun and 2nd Ranger said or...

waitUntil {unitReady _guard};
_guard playMove "c7a_bravoTOerc_idle24"; 
waitUntil {unitReady _guard};
_guard playMove "c7a_bravoTleskani_idle4";

What ever suits your style =) all does the same thing.

Share this post


Link to post
Share on other sites

unitReady doesn't wait for a unit to be done with an animation; it means that the unit isn't busy doing something action-related, for example carrying out an order. For the waitUntil method, what you would want is animationState:

Unit switchMove "c7a_bravoTOerc_idle24";

waituntil {animationState Unit != "c7a_bravoTOerc_idle24"};

Unit switchMove "c7a_bravoTleskani_idle4";

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  

×