OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: O Neil on 18 May 2003, 11:21:14

Title: How do I stop a script ?
Post by: O Neil on 18 May 2003, 11:21:14
Hey

Say I had the Flak script, (For eg) and I wanted it to stop it after a while, how do I stop it? Using triggers ?

Cheers

O Neil ;)
Title: Re:How do I stop a script ?
Post by: macguba on 18 May 2003, 18:38:33
You stop a script from within the script by use of the line

exit

If you wanted to make a script stop when something happened in the game, then you would use a trigger to set a variable to true when the thing happened.

Activation box/Condition:  whatever you like
On activation:   endscript=true

In the script you would probably have a loop:

#loop
? (not endscript): exit
whatever the script does
~1
goto "loop"



Title: Re:How do I stop a script ?
Post by: O Neil on 19 May 2003, 08:55:17
OK, thxs

O Neil ;)