getRelDir: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \|(x[0-9]|p[0-9]{1,2}|descr|game[0-9]|version[0-9]|s[0-9]|exec|r[0-9]|arg|eff|branch|serverExec|gr[0-9]|mp|pr|seealso) +=" to " |$1=")
m (Text replacement - " \| ?\[\[([a-zA-Z0-9]+)\]\] *\|x1=" to " |r1= $1 |x1=")
Line 15: Line 15:
|p1= object: [[Object]]
|p1= object: [[Object]]
|p2= position: [[Object]], [[Position2D]] or [[Position3D]]
|p2= position: [[Object]], [[Position2D]] or [[Position3D]]
| [[Number]]
|r1= [[Number]]
 
|x1= <code>_reldir = [[player]] '''getRelDir''' tank;</code>
|x1= <code>_reldir = [[player]] '''getRelDir''' tank;</code>
|seealso= [[getDir]], [[direction]], [[getDirVisual]]
|seealso= [[getDir]], [[direction]], [[getDirVisual]]

Revision as of 11:28, 11 June 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Object Manipulation

Syntax

Syntax:
Syntax needed
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
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.