Home
Intel Depot
Editors Depot
Missions Depot
Addons Depot
Forum
Home
Help
Search
Login
Register
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
ArmA - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
) »
unit position and weapon in hand
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: unit position and weapon in hand (Read 1919 times)
0 Members and 1 Guest are viewing this topic.
Mr.Peanut
Former Staff
urp!
unit position and weapon in hand
«
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....
Logged
urp!
RaymondLu
Members
Re: unit position and weapon in hand
«
Reply #1 on:
16 Apr 2007, 08:27:58 »
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
«
Last Edit: 16 Apr 2007, 11:47:12 by bedges
»
Logged
h-
OFPEC Site
Administrator
Formerly HateR_Kint
Re: unit position and weapon in hand
«
Reply #2 on:
16 Apr 2007, 09:33:03 »
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
/
setUnitPosWeak
..
It has nothing to do with getting the unit's stance..
Logged
Project MCAR
---
Northern Fronts
---
Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.
Mandoble
Former Staff
Re: unit position and weapon in hand
«
Reply #3 on:
16 Apr 2007, 11:53:32 »
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.
Logged
The Triple Blow
|
ArmA Videos
|
Mando Missile ArmA
Cheetah
Former Staff
Re: unit position and weapon in hand
«
Reply #4 on:
16 Apr 2007, 16:51:04 »
Or use a command which returns the
animationState
of a soldier.
Logged
Like missions? Help with
Beta Testing!
or take a look at the OFPEC
Missions Depot
for reviewed missions!
Mr.Peanut
Former Staff
urp!
Re: unit position and weapon in hand
«
Reply #5 on:
16 Apr 2007, 18:36:24 »
Code:
[Select]
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?
«
Last Edit: 16 Apr 2007, 19:17:28 by Mr.Peanut
»
Logged
urp!
Mandoble
Former Staff
Re: unit position and weapon in hand
«
Reply #6 on:
16 Apr 2007, 21:26:41 »
Prone? Crouch? Standing up?
Logged
The Triple Blow
|
ArmA Videos
|
Mando Missile ArmA
Mr.Peanut
Former Staff
urp!
Re: unit position and weapon in hand
«
Reply #7 on:
17 Apr 2007, 17:10:54 »
Found another solution
here
Logged
urp!
Mandoble
Former Staff
Re: unit position and weapon in hand
«
Reply #8 on:
17 Apr 2007, 22:06:11 »
Do you mean looking for substrings into unit current anim phase or something like that?
Logged
The Triple Blow
|
ArmA Videos
|
Mando Missile ArmA
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
ArmA - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
) »
unit position and weapon in hand
Top of page