OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: haroon1992 on 16 Mar 2010, 13:58:56

Title: Trying to detect unit's stand
Post by: haroon1992 on 16 Mar 2010, 13:58:56
I am trying to detect a unit's stance with the command
Code: [Select]
unitPos unit==positionbut its not working properly...

The link of Cheetah's Detect Position is broken (both in the Editor's Depot and the forum thread attachment)
(I got a 404 Error)

I am now creating a script for Mathias' Mission,the script makes the unit catch fire if they get too close to a fire source(campfire,firepit etc).
But the fire remains in the air if the unit go prone.
(I  succeeded lowering the Z value of the fire position if the unit is dead but I cannot find to way to check if a unit is prone so that I could lower the fire)
Title: Re: Trying to detect unit's stand
Post by: Wolfrug on 16 Mar 2010, 14:36:27
You could try and see if Mando GetPos (http://www.ofpec.com/ed_depot/index.php?action=details&id=420&game=ArmA) still works in Arma 2 - otherwise maybe he can make an A2-compatible version of it :D

That's the only way I know of to figure out positions. I'm guessing attachTo doesn't notice animations either, am I right (e.g. if you go prone with something 'attached' to your back, it'll float in the air)? If it did, you could just attach an object to the player and then attach the flame particles to that object, but yeah...

Wolfrug out.
Title: Re: Trying to detect unit's stand
Post by: h- on 16 Mar 2010, 14:52:34
attachTo (http://www.ofpec.com/COMREF/index.php?action=details&id=901&game=All) works just fine with this kind of thing, no need to detect any stances.
Just create a particle source and attach it to the unit's pelvis for example..

Code: [Select]
_p = "#particlesource" createVehicleLocal (position _unit);
_p attachTo [_unit,[0,0,0],"Pelvis"];
<add your particleparameter stuff here>