weaponDirection: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (VBS2 scripting category removal)
(mass edit: removing obsolete </dt> and </dd> tags)
Line 37: Line 37:
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on August 18, 2007 - 12:18</dd>
<dd class="notedate">Posted on August 18, 2007 - 12:18
<dt class="note">'''[[User:HAC_mainframe|HWM mainframe]]'''</dt><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,Z axis,Y axis]
The numbers are representing offset as follows : [X axis,Z axis,Y axis]
Line 46: Line 46:
<pre>_array = _this weaponDirection "weapon class" ;
<pre>_array = _this weaponDirection "weapon class" ;
_dir_degrees = (_array select 0) atan2 (_array select 1);</pre>
_dir_degrees = (_array select 0) atan2 (_array select 1);</pre>
</dd>
 
<dd class="notedate">Posted on November 11, 2007 - 01:41</dd>
<dd class="notedate">Posted on November 11, 2007 - 01:41
<dt class="note">'''[[User:Messiah2|MessiahUA]]</dt><dd class="note">
<dt class="note">'''[[User:Messiah2|MessiahUA]]<dd class="note">
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.
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.
</dd>


<dd class="notedate">Posted on November 13, 2007 - 15:54</dd>
 
<dt class="note">'''[[User:UNN|UNN]]</dt><dd class="note">
<dd class="notedate">Posted on November 13, 2007 - 15:54
<dt class="note">'''[[User:UNN|UNN]]<dd class="note">
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.  
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.  


[http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=a25eef63faad0e555557e7e17118a60c;act=ST;f=80;t=69777 Turret Animations] - [http://forums.bistudio.com/showthread.php?t=63918 new forum]
[http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=a25eef63faad0e555557e7e17118a60c;act=ST;f=80;t=69777 Turret Animations] - [http://forums.bistudio.com/showthread.php?t=63918 new forum]
</dd>
 
<!-- Note Section END -->
<!-- Note Section END -->



Revision as of 03:50, 18 October 2011

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

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, z, y]
Groups:
Uncategorised

Syntax

Syntax:
Array = vehicleName weaponDirection weaponName
Parameters:
vehicleName: 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

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);
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