BIS fnc position: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<tt>([^= ]+)<\/tt>" to "{{hl|$1}}")
m (Text replacement - "PositionAGL" to "PositionAGL")
Line 9: Line 9:
|gr1= Positions
|gr1= Positions


|descr= Returns [[PositionAGL]], unless passed argument is [[Array]], then the same array is returned. When position is [[Object]] and alternative position is stored in {{hl|"BIS_fnc_position_forced"}} variable on this object, the stored position is used rather than actual object position. This function is a pretty safe way to get the position of an entity.
|descr= Returns [[Position#PositionAGL|PositionAGL]], unless passed argument is [[Array]], then the same array is returned. When position is [[Object]] and alternative position is stored in {{hl|"BIS_fnc_position_forced"}} variable on this object, the stored position is used rather than actual object position. This function is a pretty safe way to get the position of an entity.


|s1= argument call [[BIS_fnc_position]]
|s1= argument call [[BIS_fnc_position]]

Revision as of 16:52, 5 January 2022

Hover & click on the images for description

Description

Description:
Returns PositionAGL, unless passed argument is Array, then the same array is returned. When position is Object and alternative position is stored in "BIS_fnc_position_forced" variable on this object, the stored position is used rather than actual object position. This function is a pretty safe way to get the position of an entity.
Execution:
call
Groups:
Positions

Syntax

Syntax:
argument call BIS_fnc_position
Parameters:
argument - Could be one of:
  • Array - Position in format [x, y] or [x, y ,z]
  • Object - Object
  • Group - Group, group leader position is used
  • Location - Location
  • String - Marker or variable name containing object
To get the position of an Eden Entity use _entity get3DENAttribute "Position" select 0;
Return Value:
Array - Position in format [x, y] or [x, y ,z]

Examples

Example 1:
_pos = player call BIS_fnc_position;

Additional Information

See also:
Position

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