Jump to content
Sign in to follow this  
SomeOFPGuy

Solution to units falling when going 'prone'

Recommended Posts

I though I'd like to share this small script of mine. If anyone else has had a hard time getting guards (on towers, or anywhere) to stay where you place them instead of falling off once someone starts shooting, here you go:

; [unitname]exec "stayput.sqs"

;by SomeOFPGuy

_theperson=_this select 0

_xco=getpos _theperson select 0

_yco=getpos _theperson select 1

_zco=getpos _theperson select 2

#theloop

?(!(alive _theperson)):goto "endofloop"

?((getpos _theperson select 0 !=_xco)&&(getpos _theperson select 1 !=_yco)): _theperson setpos[_xco,_yco,_zco]

goto "theloop"

#endofloop

exit

*note once the unit dies, their bodies will leave the set spot in the appropriate airborn direction  wink.gif

Just like to say thanks for everyone helping out us noobs with OFP

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×