GetNearbyPlayers()
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | GetNearbyPlayers() | |
| Function Description: | returns a table of player units within a certain radius of a given point | |
| File Location: | cmm.DCSFunctions.lua | |
| Syntax: | CMM.GetNearbyPlayers()( table vec3 , number or nil radius , number or nil coal ) | |
| Return Value: | table or nil | |
| Parameters: | Name | Description |
| vec3 | vec3 table of the point you want to search around | |
| radius | Radius in meters to search for player units, if nil it will default to 1000 meters | |
| coal | Coalition number to filter results by, if nil it will return players from all coalitions | |
| Example: | CMM.GetNearbyPlayers(<vec3>, 500, coalition.side.RED) | |
| Example Description: | Will return a list of player units within 500 meters of the specified vec3 point that are in the red coalition | |
| Related Functions: | ||
| Notes: | ||