weaponDirection: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
|1.00|= Game version | |1.00|= Game version | ||
|eff= global |= Effects in MP | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 30: | Line 32: | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
Returned direction is an array holding a direction vector, see [[vectorDir]], with 3 components, each with values between -1 and 1. | Returned direction is an array holding a direction vector, see [[vectorDir]], with 3 components, each with values between -1 and 1. | ||
<!-- Note Section END --> | |||
h3 style="display:none">Notes</h3> | |||
<dl class="command_description"> | |||
<!-- Note Section BEGIN --> | |||
<dd class="notedate">Posted on August 18, 2007 - 12:18</dd> | |||
<dt class="note">'''[[User:HAC_mainframe|HWM mainframe]]'''</dt><dd class="note"> | |||
Works great in multiplayer. | |||
The numbers are representing offset as follows[X axis,Z axis,Y axis] | |||
The return array can be processed-converted into degrees as follows: | |||
<pre>_array = _this weaponDirection "weapon class" ; | |||
_dir_degrees = (_array select 0) atan2 (_array select 1);"</pre> | |||
<!-- Note Section END --> | <!-- Note Section END --> | ||
</dl> | </dl> |
Revision as of 10:26, 18 August 2007
Description
- Description:
- Returns the direction that the given weapon is pointing at.
- Groups:
- Uncategorised
Syntax
- Syntax:
- vehicle weaponDirection weaponName
- Parameters:
- vehicle: Object
- weaponName: String
- Return Value:
- Array
Examples
- Example 1:
_dir = _vehicle weaponDirection "M16"
Additional Information
- See also:
- See also needed
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
-
Returned direction is an array holding a direction vector, see vectorDir, with 3 components, each with values between -1 and 1.
h3 style="display:none">Notes
- Posted on August 18, 2007 - 12:18
- HWM mainframe
-
Works great in multiplayer.
The numbers are representing offset as follows[X axis,Z axis,Y 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);"