OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: headshot_snipe on 09 Apr 2003, 19:25:05
-
ok here goes: :-\
i made a script so that when dude1 is at a certain distance from dude2, dude 2 puts his hands up. here is my script:
_cop = _this select 0
_res1 = _this select 1
#update
? (_cop Distance _res1) =< 2 : goto"restraining"
goto"update"
#restraining
_res1 switchmove"FXstandsur"
#update2
? not(alive _res1) : goto"dead"
goto"update2"
#dead
_res1 switchmove"FXstandsurdead"
exit
when i run it there is an error:
' (_cop Distance _res1) [ # ]=< 2 : goto"restraining" ' error unknown operator
is there smth wrong in this line? ???
thx :)
-
Remove the space between the ? and (.
;)
-
Also, I think it should be <= not =<.
That's more than likely the problem. :)
Hope this helps.
-
thanks for the replies but its a no go :o. the same error comes up every time.
anymore ideas?
-
Remove the "=".
-
use
@ _cop distance _res1 < 2
_res1 switchmove"FXstandsur"
@ not(alive _res1)
_res1 switchmove"FXstandsurdead"
exit
btw every1 - dont belive macguba
@ works da same as trigers not makes da comp slower ;D
LCD OUT
-
thanks LCD :D, it works perfect now, and its way simpler. ;D