nearestObject

From Bohemia Interactive Community
Revision as of 10:34, 28 August 2007 by Mikero (talk | contribs)
Jump to navigation Jump to search
Hover & click on the images for description

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.
Groups:
Uncategorised

Syntax

Syntax:
Parameters:
ClassType: String
Return Value:
Object

Examples

Example 1:
_nObject = nearestObject [player, "StreetLamp"]
Example 2:
_nObject = nearestObject [player, "Tank"]

Additional Information

See also:
nearestObject typenearestObjectsnearObjectsnearestObject id

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

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

Bottom Section