OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: x_Horst on 31 May 2004, 15:56:04
-
Hi All
Is there any chance, in script, how to determine if soldier is standing, crauching or laying?
Thx
XHK_Horst
-
Basicly, no...
You can't :(
You could maybe make a new addon, that is a really weak bullet (No dammage), and make it at different heights at the player.. And if it hits at z height of 5.. They're standing up.. If at z of 3, hits, they're crouched, if at z = 1, they're prone (In that order.. The crouch one would hit a standing person)
Something like this :
make weakbullet
setpos bullet
set velocity towards player
player add a hit event handler
if hit, remove eventhandler, quit scipt
Etc
Dunno..
- Ben
-
Hmm... that's one of the more creative approaches I've heard in regards to this problem. However, since you have to damage a unit by atleast 5% of its maximum life for a "hit" EH to fire, I'm afraid using a bullet that does no dammage wouldn't work. But perhaps a damaging bullet would work, and then you could heal the unit again in the EH.....
-
BIS has forgotten the command Getunitpos :(
-
THX All
I`ll try it
XHK_Horst