getRelDir: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (template:command argument fix)
(3 intermediate revisions by 3 users not shown)
Line 2: Line 2:
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma3dev |= Game name
|arma3|= Game name
|1.55|= Game version
 
|1.56|= Game version
 
|arg= global|= Arguments in MP
|arg= global|= Arguments in MP
____________________________________________________________________________________________
____________________________________________________________________________________________


| Returns direction, which is relative to object's current direction, from given object to another object or position in the range from 0 to 360, the equivalent of [[BIS_fnc_relativeDirTo]]. |= Description
| Returns direction, which is relative to object's current direction, from given object to another object or position in the range from 0 to 360, the equivalent of [[BIS_fnc_relativeDirTo]]. Taking the current [[direction]] of the object into account. |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| object '''getRelDir''' position |= Syntax
| object '''getRelDir''' position |SYNTAX=


|p1= object: [[Object]] |=Parameter 1
|p1= object: [[Object]] |PARAMETER1=
|p2= position: [[Object]], [[Position2D]] or [[Position3D]] |=Parameter 2
|p2= position: [[Object]], [[Position2D]] or [[Position3D]] |PARAMETER2=
| [[Number]] |= Return value
| [[Number]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
|x1 = <code>_reldir = [[player]] '''getRelDir''' tank;</code> |= Example 1
|x1 = <code>_reldir = [[player]] '''getRelDir''' tank;</code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________
| [[getDir]], [[direction]], [[getDirVisual]] |= See also
| [[getDir]], [[direction]], [[getDirVisual]] |SEEALSO=


}}
}}
Line 34: Line 36:
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on August 7, 2018 - 21:50 (UTC)</dd>
<dt class="note">[[User:Tankbuster|Tankbuster]]</dt>
<dd class="note">
To clarify, this returns a relative direction, so objects directly in front are said to be at zero degrees. So, taking example 1 above, if the tank is in front of the player, this function will return 0. If the tank is to the right of the player, it will return 90.
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 15:40, 7 April 2019

Hover & click on the images for description

Description

Description:
Returns direction, which is relative to object's current direction, from given object to another object or position in the range from 0 to 360, the equivalent of BIS_fnc_relativeDirTo. Taking the current direction of the object into account.
Groups:
Uncategorised

Syntax

Syntax:
object getRelDir position
Parameters:
object: Object
position: Object, Position2D or Position3D
Return Value:
Number

Examples

Example 1:
_reldir = player getRelDir tank;

Additional Information

See also:
getDirdirectiongetDirVisual

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

Bottom Section

Posted on August 7, 2018 - 21:50 (UTC)
Tankbuster
To clarify, this returns a relative direction, so objects directly in front are said to be at zero degrees. So, taking example 1 above, if the tank is in front of the player, this function will return 0. If the tank is to the right of the player, it will return 90.