Jump to content
Sign in to follow this  
Twiznak

I need help adding a cool down timer to a repeatable trigger

Recommended Posts

Hi.I need help adding a 1500 sec cool down timer, to a repeatable trigger placed in the editor, that has a 1200 sec countdown to activation. The reason being is that the trigger calls a script and I don't want the trigger to be activated twice, before it has a chance to call the script once. I found a post that provided a working cool down to a trigger, but I don't know how implement it in this situation. Would you please show me how to do so? Thank you.

repeatable trigger:

Variable =                      Spawn_Hunters

Countdown timer =      12000

activation condition  

p_1 inArea thisTrigger;

on activation  

nul = execVm "hunterwaves.sqf"; hintsilent "Hunters have been dispatched!"; 

 

working trigger with a 1500 sec cooldown:

Variable =            trigger1

activation condition  

this and (trigger1 getvariable ["delay",true]);

on activation

null=[] spawn {sleep (1500);trigger1 setvariable ["delay",true];hint "Active"}; trigger1 setvariable ["delay",false];hint "deac";

 

          

 

Share this post


Link to post
Share on other sites
36 minutes ago, pierremgi said:

Click on timeout.

I rephrased my question. In order for that to work I would need to know the inverse of this:

p_1 inArea thisTrigger

How would I amend this code to activate the trigger when "p_1" in not in the trigger area?

Merci encore, Pierremgi.

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  

×