Home   Help Search Login Register  

Author Topic: How do I stop a script ?  (Read 443 times)

0 Members and 3 Guests are viewing this topic.

O Neil

  • Guest
How do I stop a script ?
« 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 ;)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:How do I stop a script ?
« Reply #1 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"



Plenty of reviewed ArmA missions for you to play

O Neil

  • Guest
Re:How do I stop a script ?
« Reply #2 on: 19 May 2003, 08:55:17 »
OK, thxs

O Neil ;)