OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: tai mai shu on 24 Aug 2002, 04:10:06

Title: how do i deactivate a trigger with a script?
Post by: tai mai shu on 24 Aug 2002, 04:10:06
lets say i runa script that checks if a unit is damaged,heals it, and keeps looping. welll, how can i deactivate it within the in-game editor, using triggers or waypoint??!?!  thanks in advance for any help.

tai mai shu
Title: Re:how do i deactivate a trigger with a script?
Post by: Black_Feather on 24 Aug 2002, 04:23:31
you need to put a condition in the script like this

#loop
blahblahblah
?stopscript : goto "end"
goto "loop"

#end
exit

then in the trigger put

stopscript = true
Title: Re:how do i deactivate a trigger with a script?
Post by: tai mai shu on 24 Aug 2002, 06:15:41
ah.  thats ingenious! im a newb, and didnt realize that variables used in triggers could be communicated to scripts.  hmm, cool.  thanks a lot!