Jump to content

PlayerInRange

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (PlayerInRange – created via PowerShell script (2025-11-11T21:12:10Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: PlayerInRange
Function Description: Returns boolean if a specific Unt is within range of the vec3 location.
File Location: cmm.DCSFunctions.lua
Syntax: CMM.PlayerInRange( table vec3 , table Unt , number Range )
Return Value: boolean or nil
Parameters: Name Description
vec3vec3 table
UntUnit object table
RangeRange in meters from the vec3 point
Example: CMM.PlayerInRange({x=0,y=0,z=0}, Unt, 500)
Example Description: Returns true if the unit is within 500 meters of the specified point, otherwise returns nil.
Related Functions:
Notes: