bwf_ares 0 Posted May 1, 2007 Hello, I'm editing a mission that appears simple but the ttrigger needed is not :s 2 camps must hold a small town (Bonanza) for 2 minutes. When a camp enters the town, a countdown starts, and if an enemy enters the town, the countdown stops. When the threat is destroyed, the countdown starts over... It seems easy but I can't figure out how to handle this with the triggers??? Has someone solved that kind of problem already? Share this post Link to post Share on other sites
Op4 BuhBye 0 Posted May 1, 2007 You cant solve it with triggers cause you need to use 2 triggers, a publicvarable and a script that countsdown and checks the variable. Share this post Link to post Share on other sites
bwf_ares 0 Posted May 1, 2007 And someone has already written such a script ? :s Share this post Link to post Share on other sites
Op4 BuhBye 0 Posted May 1, 2007 In your trigger for the camp present, in the OnAct put []exec "hold.sqs" . Name the script below hold.sqs. Make another trigger for the enemy present and in the OnAct field put         threat = 1;publicvariable "threat" In the DeAct field put        threat = 0;publicvariable "threat" Make an init.sqs and put this in..... threat = 0 publicvariable "threat" The script below will start a count when you enter the trigger and check for enemy in the trigger every 5 seconds for 2 mins. ;hold.sqs 2 minute countdown with a check for enemy every 5 sec. #loop ~3 _count = 0 ?threat == 0 : goto "countdown" goto :loop" #countdown ~5 ?_count == 24 : goto "done" ?threat == 1 : goto "loop" #check ?threat == 1 : goto "loop" ?threat == 0 : goto "countdown" _count = _count + 1 #done exit Share this post Link to post Share on other sites
bwf_ares 0 Posted May 2, 2007 Wow, thanx alot, that's exactly what I was looking for, I'm trying it right away Share this post Link to post Share on other sites