Terminating a Script on Sensor Exit - Looking for Help

PezDax

Member
I have several Sensors on my server.

Until now, when the player exits the Sensor area , the script that was triggered by the Sensor terminates and all is well.

Now I need a way to terminate a different script when the player leaves the Sensor.

I've been trying to add the Terminate command to the Sensor exit, but I'm having trouble with the proper syntax. Most of my attempts, just caused the mission file to crash.

This syntax runs, but it doesn't terminate the "timer1.sqf" script when the player leaves the Sensor area. The Sensor's name is "dome11" ...

expDesactiv="terminate dome11; terminate [] execVM ""Timers\timer1.sqf"";";

Any help with the proper way to do this is appreciated.
 
You need to assign a script execution handle to timer1:

handleTimer1 = [] execVM ""Timers\timer1.sqf"";";
.....

expDesactiv="terminate dome11; terminate handleTimer1;"
 
Whoops. I should have been more clear. When you exec timer1, that's when you assign the handle...

handleTimer1 = [] execVM "Timers\timer1.sqf";
 
Back
Top