BIS fnc nearestPosition: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "{{Function " to "{{RV|type=function ") |
Lou Montana (talk | contribs) m (Text replacement - "\{\{ *codecomment *\| *\/\/ *([^ ]+) *\}\} " to "{{cc|$1}}") |
||
Line 17: | Line 17: | ||
| [[Object]], [[Location]], [[Group]], [[String]] (marker) or [[Position]] - the closest from ''items'' | | [[Object]], [[Location]], [[Group]], [[String]] (marker) or [[Position]] - the closest from ''items'' | ||
|x1= <code>{{ | |x1= <code>{{cc| Find the nearest marker from player}}_nearestMarker = [<nowiki/>[[allMapMarkers]], [[player]]] [[call]] [[BIS_fnc_nearestPosition]];</code> | ||
_nearestMarker = [<nowiki/>[[allMapMarkers]], [[player]]] [[call]] [[BIS_fnc_nearestPosition]];</code> | |||
|x2= <code>{{ | |x2= <code>{{cc| Find the nearest marker to trigger using trigger onActivation code}}_nearestMarker = [<nowiki/>[[allMapMarkers]], [[thisTrigger]]] [[call]] [[BIS_fnc_nearestPosition]];</code> | ||
_nearestMarker = [<nowiki/>[[allMapMarkers]], [[thisTrigger]]] [[call]] [[BIS_fnc_nearestPosition]];</code> | |||
| [[nearObjects]], [[nearestObject]], [[nearestObjects]], [[BIS_fnc_nearestPoint]], [[BIS_fnc_nearestNum]], [[BIS_fnc_nearestRoad]], [[BIS_fnc_nearestHelipad]], [[BIS_fnc_isPosBlacklisted]] | | [[nearObjects]], [[nearestObject]], [[nearestObjects]], [[BIS_fnc_nearestPoint]], [[BIS_fnc_nearestNum]], [[BIS_fnc_nearestRoad]], [[BIS_fnc_nearestHelipad]], [[BIS_fnc_isPosBlacklisted]] |
Revision as of 16:31, 29 January 2021
Description
- Description:
- Description needed
- Execution:
- call
- Groups:
- Positions
Syntax
- Syntax:
- Syntax needed
- 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:
- Return value needed
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:
- See also needed
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