Jump to content
Sign in to follow this  
Pundaria

looping, how?

Recommended Posts

This is the case. I am making a mission that one shell loop an animation, namely "RepairingKneel", until 10 minutes later. How shell I use the code?

Share this post


Link to post
Share on other sites

oh, I think it is not helping for now. I want the animation loop in the 10 minutes, and then the AI return to normal. Which the mission you gave couldn't help. But I really appreciate

Any other help people can offer me, please?

Share this post


Link to post
Share on other sites

this script will play the move for 10 minutes (600 seconds) and then end.

_cnt = 0;
while {_cnt < 600} do {
unitname playmove "RepairingKneel";
unitname disableAI "ANIM";
sleep 3;
_cnt = _cnt + 3;
};
unitname playmove "";
unitname enableAI "ANIM";

if you want to use it in a units init line or a trigger:

_null = [] spawn {
[b][i]place the code above in here[/i][/b]
};

in any case, remember to switch out unitname for the name of your repairing unit.

Share this post


Link to post
Share on other sites

Pseudo-code ahead, you'll have to fix it :)

_tenMinutes = Time + (10 * 60);

While {Time < _tenMinutes} do

{

...code here...

};

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  

×