Home   Help Search Login Register  

Author Topic: @, wait for conditions?  (Read 805 times)

0 Members and 1 Guest are viewing this topic.

evil

  • Guest
@, wait for conditions?
« on: 23 Mar 2003, 22:13:13 »
I can't seem to get the proper syntax for a script to wait for a condition...
I know its supposed to be @condition but that doesn't seem to work.
Heres my condition:

? (getdammage _unit1 <= .7): _unit1 setdammage (getdammage _unit1 - _multi / 10)

basically what it's going to do is simulate extra health/armor.  This is going to be the first of several similiar conditions that will follow.  Obviouslly I can't loop it, and obviouslly it's useless just running it and not waiting for the condition to be met.  So here's what I tried:

@ ? (getdammage _unit1 <= .7): _unit1 setdammage (getdammage _unit1 - _multi / 10)

@(getdammage _unit1 <= .7): _unit1 setdammage (getdammage _unit1 - _multi / 10)

@? (getdammage _unit1 <= .7): _unit1 setdammage (getdammage _unit1 - _multi / 10)

...but none worked.  I either got unknown operator or invalid variable.
Some help, please?

Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:@, wait for conditions?
« Reply #1 on: 23 Mar 2003, 23:07:36 »
The @ command continues to the next line when the specified condition is met. Thats all it can do.

So this what you need to make the @ command work:

@getdammage _unit1 <= .7
 _unit1 setdammage (getdammage _unit1 - _multi / 10)
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.

evil

  • Guest
Re:@, wait for conditions?
« Reply #2 on: 24 Mar 2003, 01:06:40 »
I get it now.  Thanks :)