weaponDirection: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) m (This type of command cannot have global effect as it is read only command. Global arguments, yes.) |
Killzone Kid (talk | contribs) mNo edit summary |
||
Line 15: | Line 15: | ||
For addons the weapon name must be an entry in CfgWeapons. | For addons the weapon name must be an entry in CfgWeapons. | ||
Returns an array in format [x, z | Returns an array in format [x, y, z] |= Description | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 27: | Line 27: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= < | |x1= <code>_weaponVectorDir = [[player]] [[weaponDirection]] [[currentWeapon]] [[player]];</code> |= Example 1 | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[eyeDirection]] |= See also | ||
}} | }} | ||
Line 40: | Line 40: | ||
<dt class="note">'''[[User:HAC_mainframe|HWM mainframe]]'''<dd class="note"> | <dt class="note">'''[[User:HAC_mainframe|HWM mainframe]]'''<dd class="note"> | ||
Works great in multiplayer. | Works great in multiplayer. | ||
The numbers are representing offset as follows : [X axis, | The numbers are representing offset as follows : [X axis,Y axis,Z axis] | ||
The return array can be processed-converted into degrees as follows: | The return array can be processed-converted into degrees as follows: |
Revision as of 14:33, 21 November 2013
Description
- Description:
- Returns the direction that the vehicle weapon is aiming in. For addons the weapon name must be an entry in CfgWeapons. Returns an array in format [x, y, z]
- Groups:
- Uncategorised
Syntax
- Syntax:
- vehicleName weaponDirection weaponName
- Parameters:
- vehicleName: Object
- weaponName: String
- Return Value:
- Array - format Vector3D
Examples
- Example 1:
_weaponVectorDir = player weaponDirection currentWeapon player;
Additional Information
- See also:
- eyeDirection
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
- Posted on August 18, 2007 - 12:18
- HWM mainframe
-
Works great in multiplayer.
The numbers are representing offset as follows : [X axis,Y axis,Z axis]
The return array can be processed-converted into degrees as follows:
_array = _this weaponDirection "weapon class" ; _dir_degrees = (_array select 0) atan2 (_array select 1);
- Posted on November 11, 2007 - 01:41
- MessiahUA
- WeaponClass can only be the primary turret of the vehicle. For example it is not possible to get direction of commander's M2 on M1Abrams.
- Posted on November 13, 2007 - 15:54
- UNN
-
For an alternative to the weaponDirection command, see the following post on the offical forums. On how to obtain the direction of multiple turrets on vehicles.
Turret Animations - new forum
Bottom Section
Categories:
- Scripting Commands
- Introduced with Arma version 1.00
- Arma: New Scripting Commands
- Arma: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands: Local Effect
- Scripting Commands OFP Elite
- Scripting Commands ArmA
- Scripting Commands ArmA2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters
- Command Group: Weapons