Jump to content
Sign in to follow this  
Ice_Rhino

Trigger on Timer or event

Recommended Posts

Hi All,

I have an AI team that works its way through a town checking various locations. The human team provides Sniper overwatch. Currently the AI team holds at a locations until certain enemy groups are killed, it then progresses along its waypoint path. What I would like to do is that if the enemy group is killed, the AI team moves, if 15 mins passes, the team moves on regardless. I kind of have a way to do it in my head, but I can't quite formulate it.

Any help appreciated

Thanks

Share this post


Link to post
Share on other sites

waitScript = [] spawn
{
sleep (60 * 15); //too lazy to open calculator. Note that this is possible.
//	sleep ^whatever that is equal to; //identical effects
};

waitUntil {count alive units ENEMYGROUP == 0 || scriptDone waitScript};
terminate waitScript;

Spawn a new thread and add a check to see if it's finished under your conditions ( || means or). Then make sure script is terminated.

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  

×