Jump to content
Sign in to follow this  
flasher44

Sensor trigger stopping

Recommended Posts

When for exemple a soldier activate a sensor, and you put a condition of time for exemple of 30s before triggering.

How to stop the countdown or reset the sensor before the end of the 30s and prevent it to trigger if the soldier do a special action ? Because so far when a sensor is activated under the required condition I can't stop it even if the conditions of activation are not met anymore.

Help please !!!!

Share this post


Link to post
Share on other sites

Make an extra trigger (size 0x0 ) and just put in it

On condition : </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">true<span id='postcolor'>

On activation : </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">ok=true<span id='postcolor'>

Then make another trigger ( the one that has to deactivate the one you have already in the mission now with the countdown )

triggersize 0x0

On condition : whatever is needed to turn of the countdown trigger

On activation : </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">ok=false<span id='postcolor'>

Now in the first trigger ( the countdown one ) you just have to add the variable to the current condition.

If for instance it s a trigger that just gets activated when West goes in the triggerarea there will only be "this" in the on condition field of it.

Make </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">this AND ok<span id='postcolor'> of that condition, or when something else is in it just add </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">AND ok<span id='postcolor'> to it.

That should do it. ( this will only work if you already had a condition to the countdown trigger )

Cheers

Share this post


Link to post
Share on other sites

Well, let me try explaining it... confused.gif

The trigger that times out after 30's that you have now, make it do this;

condition: (your custom condition for trigger) && ! actionOn

timeout: 30s

onActivation : actionOn = true;

onDeactivation: actionOn = false;

REPEATEDLY

Then create another trigger, size 0x0

condition: (your custom condition for trigger) && actionOn

onActivation: (your custom effect)

And another:

size 0x0

condition: actionOn && ! (your custom condition for trigger)

onActivation: actionOn = false

REPEATEDLY

Also initialize actionOn to false somewhere at the start of the mission.

(this should be a way of doing it, I may have missed something)

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  

×