BIS fnc position: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|gr([0-9]+) = " to "|gr$1= ")
m (formatting)
Line 1: Line 1:
{{RV|type=function
{{RV|type=function


| tkoh
|game1= tkoh


|1.00
|version1= 1.00
 
|game2= arma3
 
|version2= 0.50


|gr1= Positions
|gr1= Positions


|Returns [[PositionAGL]], unless passed argument is [[Array]], then the same array is returned. When position is [[Object]] and alternative position is stored in <tt>"BIS_fnc_position_forced"</tt> variable on this object, the stored position is used rather than actual object position.
|descr= Returns [[PositionAGL]], unless passed argument is [[Array]], then the same array is returned. When position is [[Object]] and alternative position is stored in <tt>"BIS_fnc_position_forced"</tt> 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.


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


|p1= argument - could be one of:
|p1= argument - Could be one of:
<span>
* [[Array]] - Position in format <tt>[x, y]</tt> or <tt>[x, y ,z]</tt>
* [[Array]] - position in format [x,y] or [x,y,z]
* [[Object]] - Object
* [[Object]] - object
* [[Group]] - Group, group leader position is used
* [[Group]] - group, group leader position is used
* [[Location]] - Location
* [[Location]] - location
* [[String]] - Marker or variable name containing object
* [[String]] - marker or variable name containing object
{{Feature|Informative|To get the position of an [[Eden Entity]] use {{ic|_entity [[get3DENAttribute]] "Position" [[select]] 0;}}}}
</span>


| [[Array]] - position in format [x,y] or [x,y,z]
|r1= [[Array]] - Position in format <tt>[x, y]</tt> or <tt>[x, y ,z]</tt>


|x1= <code>_pos = [[player]] [[call]] [[BIS_fnc_position]];</code>
|x1= <code>_pos = [[player]] [[call]] [[BIS_fnc_position]];</code>
Line 26: Line 29:
|seealso= [[Position]]
|seealso= [[Position]]
}}
}}
[[Category:{{Name|tkoh}}: Functions|{{uc:position}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:position}}]]

Revision as of 11:38, 5 June 2021

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