OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: headshot_snipe on 09 Apr 2003, 19:25:05

Title: another one for you
Post 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  :)

 
Title: Re:another one for you
Post by: deaddog on 09 Apr 2003, 19:38:11
Remove the space between the ? and (.

 ;)
Title: Re:another one for you
Post by: deaddog on 09 Apr 2003, 19:40:55
Also, I think it should be <=  not =<.

That's more than likely the problem.   :)

Hope this helps.
Title: Re:another one for you
Post by: headshot_snipe on 09 Apr 2003, 20:17:16
thanks for the replies but its a no go  :o. the same error comes up every time.

anymore ideas?  
Title: Re:another one for you
Post by: dmakatra on 09 Apr 2003, 20:24:15
Remove the "=".
Title: Re:another one for you
Post by: LCD on 09 Apr 2003, 21:04:52
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
Title: Re:another one for you
Post by: headshot_snipe on 09 Apr 2003, 21:35:58
thanks LCD  :D, it works perfect now, and its way simpler.  ;D