BIS fnc nearestPosition: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
No edit summary
Line 38: Line 38:
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|x1= <code>
Define nearest marker to player
_nearestMarker = [allMapMarkers, player] call BIS_fnc_nearestPosition;
 
Define nearest marker to  trigger using trigger onactivation code
_nearestMarker = [allMapMarkers, thisTrigger] call BIS_fnc_nearestPosition;
</code> |=  
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 12:40, 14 February 2016


Hover & click on the images for description

Description

Description:
/*
	File: nearestPosition.sqf

	Description:
	Function to find the nearest Object or position from a list, 
	when compared to a given Object or position.

	Parameter(s):
	_this select 0: Array of Objects, Locations, Groups, markers (String) and / or positions (Array)
	_this select 1: Comparator Object, Location, Group, marker (String) or position (Array)
	
	Notes:
	[*] For type Group the position of its leader is used.
	
	Returns:
	Object / Location / Group / marker (String) or position (Array) which is nearest to the comparator
*/

//Valid parameter count
(Placeholder description extracted from the function header by BIS_fnc_exportFunctionsToWiki)
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
Syntax needed
Return Value:
Return value needed

Examples

Example 1:
Define nearest marker to player _nearestMarker = [allMapMarkers, player] call BIS_fnc_nearestPosition; Define 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

Notes

Bottom Section