武装突袭 Wiki
Advertisement
  

Click on the images for descriptions

Introduced in

Game:
Arma 2
Version:
1.00

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)
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;

See also:
See also needed

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section

Advertisement