OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: x_Horst on 31 May 2004, 15:56:04

Title: Unit position
Post 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
Title: Re:Unit position
Post by: DBR_ONIX on 31 May 2004, 17:37:21
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
Title: Re:Unit position
Post by: General Barron on 01 Jun 2004, 00:17:54
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.....
Title: Re:Unit position
Post by: Blanco on 01 Jun 2004, 18:38:14
BIS has forgotten the command Getunitpos  :(

Title: Re:Unit position
Post by: x_Horst on 20 Jul 2004, 14:59:16
THX All

I`ll try it

XHK_Horst