OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: evil on 23 Mar 2003, 22:13:13

Title: @, wait for conditions?
Post by: evil 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?
Title: Re:@, wait for conditions?
Post by: toadlife 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)
Title: Re:@, wait for conditions?
Post by: evil on 24 Mar 2003, 01:06:40
I get it now.  Thanks :)