OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Mr.Peanut on 16 Apr 2007, 01:15:23
-
Call me lazy, but as far as I can tell ArmA has neither commands to:
1) report an infantry unit's stance(prone/crounching/standing)
2) report which weapon an infantry unit has selected(in particular I would like to know whether a unit has selected binoculars or not)
Please prove this lazy old fart wrong....
-
1) try unitPos
Description:
Return the unit position rules.
Syntax
Syntax:
unitPos person
Parameters:
person: Object
Return Value:
String
2) i'm still think about that.
#removed unnecessary quote of entire previous post - bedges
-
RaymondLu, do not quote the entire previous post if you're replying to it.
Anyways, unitPos only returns what the stance rules are for the unit set with the setUnitPos (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=s#setUnitPos)/setUnitPosWeak (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=s#setUnitPosWeak)..
It has nothing to do with getting the unit's stance.. :(
-
Didnt test it, but i'm convinced modeltoWorld uses Z = 0 for the head. So, modeltoWorld [0,0,0] would return different Z for prone/crounching/standing.
-
Or use a command which returns the animationState (http://www.ofpec.com/COMREF/ArmAOnly/index.php?action=list&game=All&letter=a#animationState) of a soldier.
-
unit modelToWorld [0,0,0]Returns a very small z height that varies slightly with the altitude of your location. On flat ground the z height does not change with stance. On sloped ground it changes even less with stance.
animationState would work but I need to search the returned string for the substring "BINDNON" if I want my script to work with different units.
edit: PositionCameraToWorld might work for the stance...
edit2: nope. no way to hook player's camera
edit3: BIS included a switchCamera command. Why did they not include a command to return which camera type a player is using or what cutResource for that matter?
-
Prone? Crouch? Standing up? (http://www.ofpec.com/forum/index.php?topic=29174.0)
-
Found another solution here (http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=3e0d6dd2bbe0dae743a30af658f70769;act=ST;f=71;t=60261;st=0)
-
Do you mean looking for substrings into unit current anim phase or something like that?