nearestObject
From Bohemia Interactive Community
| Editors, please check Policy: Scripting Command Page Syntax. |
Click on the images for descriptions
Introduced in
- Game:
- Operation Flashpoint
- Version:
- 1.00
Description
- Description:
- Returns the closes Object
- to a Position, or
- of a given ClassType to a Position, or
- of given Classtype to another Object (player eg)
ClassType's are defined as per CfgVehicles
- Before ArmA the funcion matched only objects with exactly the type given.
- Since ArmA, any object derived from the type is found as well.
Syntax
Examples
- Example 1:
_nObject = nearestObject [player, "StreetLamp"]- Example 2:
_nObject = nearestObject [player, "Tank"]
Additional Information
- Multiplayer:
- Behaviour unknown.
- See also:
- nearestObject type, nearestObjects, nearObjects, nearestObject id
Notes
Notes
Notes
-
This command can only find objects up to 50 meters away.

