BIS fnc nearestPosition: Difference between revisions
Jump to navigation
Jump to search
m (template:command argument fix) |
Lou Montana (talk | contribs) m (Text replacement - "|= Comments" to "|Comments=") |
||
Line 1: | Line 1: | ||
{{Function|= | {{Function|Comments= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 22:24, 30 August 2019
Description
- Description:
- Function to find the nearest Object or position from a list, when compared to a given reference.
- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- [items, origin] call BIS_fnc_nearestPosition
- Parameters:
- items: Array of Object, Location, Group, String (marker) and/or Position - note that for a group, leader's position is used
- origin: Object, Location, Group, String (marker) or Position
- Return Value:
- Object, Location, Group, String (marker) or Position - the closest from items
Examples
- Example 1:
// Find the nearest marker from player _nearestMarker = [allMapMarkers, player] call BIS_fnc_nearestPosition;
- Example 2:
// Find the nearest marker to trigger using trigger onActivation code _nearestMarker = [allMapMarkers, thisTrigger] call BIS_fnc_nearestPosition;
Additional Information
- See also:
- nearObjectsnearestObjectnearestObjectsBIS_fnc_nearestPointBIS_fnc_nearestNumBIS_fnc_nearestRoadBIS_fnc_nearestHelipadBIS_fnc_isPosBlacklisted
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