Home   Help Search Login Register  

Author Topic: Stopping a Script  (Read 448 times)

0 Members and 1 Guest are viewing this topic.

Bronski

  • Guest
Stopping a Script
« on: 22 Jan 2003, 22:52:21 »
Here's the situation:  I am using the Commanche Addon with the DKM mod.  My computer hits the benchmark that stops the downwash feature of it.  So, i am using the downwash script made by Vektorboson, the newest version from his site, http://home.arcor.de/vektorboson/en/index.html.

What i wanted to do was add some radio commands that would start and stop the script.  So, if people's computers were slower they could still use it if they wanted.

I just have no idea of how to stop the script.

Any suggestions?

vektorboson

  • Guest
Re:Stopping a Script
« Reply #1 on: 22 Jan 2003, 23:55:59 »
For this case I made the variable _repeat in my script!

Just rename _repeat to a global Variable like glREPEAT

This would be line 27:

Code: [Select]
_repeat = true

change in

Code: [Select]
glREPEAT = true

and change in line 57

Code: [Select]
?_repeat && alive _this : goto "repeat"

into

Code: [Select]
?glREPEAT && alive _this : goto "repeat"

There is one thing, if you set glREPEAT to false, then the effect takes not place immediately, you had to end the effect by flying fast or high. But you may additionally alter line 55

Original:
Code: [Select]
?(getpos _this select 2) < 30 && speed _this < 120 && isEngineOn _this: goto "loop"

And new:
Code: [Select]
?(getpos _this select 2) < 30 && speed _this < 120 && isEngineOn _this && glREPEAT: goto "loop"

This should work. Now you may disable the script by just setting glREPEAT to false. If you want it to appear again, execute the script.