OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Relbik on 08 Oct 2003, 03:21:10

Title: Stop a script from a trigger
Post by: Relbik on 08 Oct 2003, 03:21:10
Been awhile since I've been here.

Anyway, how can I stop a script from a trigger?

example:
East detected trigger
on activation: []exec "flash.sqs"
on deactivation: ??? "flash.sqs"

Thanks
Title: Re:Stop a script from a trigger
Post by: deaddog on 08 Oct 2003, 03:44:26
You need a global variable.  Put something like this at the beginning of your flash.sqs script:

stopflash=false

and then somewhere in the script (I assume you have a loop in there):

?stopflash:exit


In the deactivation box of the trigger put:

stopflash=true

Title: Re:Stop a script from a trigger
Post by: Relbik on 08 Oct 2003, 03:46:16
Excellent!!!  Thanks.