Jump to content

MarkerNearestPilot

From CMM Wiki
Return to CMM Command Reference
Environment: Mission Scripting
Function: MarkerNearestPilot
Function Description: Identifies and reports the nearest pilot to a given position when a marker is removed.
File Location: cmm.MapCommandFunctions.lua
Syntax: CMM.MarkerNearestPilot( table EventData )
Return Value:
Parameters: Name Description
EventData{pos <vec3>} – event data containing the position where the marker was removed. The position must be valid and within mission bounds.
Example: CMM.MarkerNearestPilot({pos = <vec3>})
Example Description: Triggers a message indicating the nearest pilot at position (100, 50, 0), using the mission's pilot database.
Related Functions:
Notes: --TODO make this function work with MakeGM and other functions