nearestObject

From Bohemia Interactive Community

Jump to: navigation, search
Editors, please check Policy: Scripting Command Page Syntax.
Introduced in Operation Flashpoint version 1.00

Click on the images for descriptions

Introduced in

Game:
Operation Flashpoint
Version:
1.00

Description

Description:
Returns the closes Object

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

Syntax:

Parameters:
ClassType: String
Return Value:
Object

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

+ Add Note

Only post proven facts here. Use the talk page or the forums for discussions.

Notes

This command can only find objects up to 50 meters away.

Bottom Section

Personal tools
Buy ArmA now!