OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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?
-
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)
-
I get it now. Thanks :)