Jump to content
Sign in to follow this  
nastros

timed trigger

Recommended Posts

i did a search for this but couldnt find anything that could help i have made a trigger to end the game when a vehicle is destroyed but the trigger activates before i get to see the explosion so is there a way to delay the trigger 10 seconds or so

Share this post


Link to post
Share on other sites

That's difficult indeed. Those triggers cannot be randomly delayed within the editor AFAIK (if anybody found a way, let me know smile_o.gif ).

I did this a couple of times with a simple detour. The object calls a script once it is dead, the script waits for 10 seconds and sets another variable and the map trigger waits for this variable, got it?

The object needs this in its activation field:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

this addEventHandler ["killed", {_this exec "killdelay.sqs"}]

In the mission directory you need to create a text file called "killdelay.sqs" with this content:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

~10

iamdead = TRUE

publicVariable "iamdead"

Last but not least you need to change your end triggers "Condition" to "iamdead".

Over and out,

Victor Farbau

Share this post


Link to post
Share on other sites

try the timeout/countdown counters smile_o.gif

timeout = condition must remain true for entire countdown, then activate

countdown = when condition true, wait countdown time, then activate

Share this post


Link to post
Share on other sites

There is a work around for this...

Put a trigger down and group it to the vehicle.

Set it to vehicle not present and in the on activation field use a "publicvariable" and set it to 1....

truck1 = 1;publicvariable "truck1"

Set the timeout in the trigger to 10 in the min, mid and max field.

Then make a trigger that is a switch to end the game and set the condition field to truck1 == 1

Make sure you define the variable to 0 in the init.sqs.

It sounds like alot but its easy.

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  

×