Home   Help Search Login Register  

Author Topic: Vars, triggers, and more vars  (Read 883 times)

0 Members and 1 Guest are viewing this topic.

307

  • Guest
Vars, triggers, and more vars
« on: 08 Dec 2002, 05:31:28 »
another problem
i want a trigger that calls itself every 5 secs as long as var1=true so it can update var2(getpos player1=p1pos)
it works except for one thing, it only calls itself once even though i have it set to repeatedly. i think the problem is that it is never deactivated as long as var1=true. so how do i get it to call itself again every 5 secs as long as var1=true(without having to deactivate it, if possible)?
i have the countdown setting set to 5 in all fields, if that means anything

Darkninja

  • Guest
Re:Vars, triggers, and more vars
« Reply #1 on: 08 Dec 2002, 14:57:48 »
Well you could use a delay script.
Easy task:
- - - - - - - - - -

~5                                  

- - - - - - - - - -

The you could make it go further with
? (var1=true): abu fire bond;
and so on.


307

  • Guest
Re:Vars, triggers, and more vars
« Reply #2 on: 08 Dec 2002, 20:07:20 »
i have no clue what ? (var1=true): abu fire bond; means or how to use it. and im NOT using a SCRIPT, im using a TRIGGER. i want the TRIGGER to fire itself ever 5 secs as long as VAR1=TRUE. but it doesnt do it because as long as VAR1=TRUE then it's never deactivated so it only runs once, even though i have it set to repeatedly. im looking for a way to get the TRIGGER to fire itself every 5 secs as long as VAR1=TRUE, but when VAR1=FALSE then it should stop calling itself.
one more thing, even if i did use a delay script it would still only call itself ONCE, and thats the problem in the first place
« Last Edit: 08 Dec 2002, 20:11:05 by 307 »

captain caffeine

  • Guest
Re:Vars, triggers, and more vars
« Reply #3 on: 09 Dec 2002, 01:17:17 »
  BY looping the script it would run continuously, until deactivated. Dont ask me how but check out the scripts in editors depot, I'm sure theres somethin in there you can use,
Read the readme file that comes along with it before using it and if ya have any problems on how to use it , thats what the forums are for, as far as a trigger firing continuously every
5 seconds good luck, it can be done but not without a major amount of headaches. If you have to have it and you have Resistance I can have one fire every so many seconds but it requires an addon which is kinda  a pain and I cant guarantee that it will be exactly 5 seconds

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:Vars, triggers, and more vars
« Reply #4 on: 09 Dec 2002, 05:47:25 »
First, a few simple scripting tricks will save you endless nights of suffering.
Second, triggers are effective for some things, but not others, like this.
Third, to do a trigger, you need:
First, to initialize a second variable, say: Recycle.  Put in the init string of some object: Recycle = True; (This won't work in MP, but of course, if you refuse to script, nothing will really work in MP).

Second, in the condition field of the trigger, put:
Var1 and Recycle

Third, give the trigger a 5 second delay (those three max min avg fields, set them all to 5)

Fourth, on activation, put "Recycle = False"

Fifth, on deactivation, put "Recycle = True"


gee a script like:
#loop
~5
?Var1:goto "loop"

sounds a lot easier, doesn't it?
Dinger/Cfit