nearestObject: Difference between revisions
Jump to navigation
Jump to search
(add. ArmA2 classification) |
|||
Line 46: | Line 46: | ||
[[Category:Scripting Commands ArmA|NEARESTOBJECT]] | [[Category:Scripting Commands ArmA|NEARESTOBJECT]] | ||
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]] | [[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]] |
Revision as of 17:00, 3 June 2009
Description
- Description:
- Nearest object of given type to given position.
For nearestObject pos, pos may be [x, y ,z, "type"] or [object, "type"] or even [x, y, z].
- 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
Examples
- Example 1:
_nObject = nearestObject [player, "StreetLamp"]
- Example 2:
_nObject = nearestObject [player, "Tank"]
Additional Information
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
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.46
- Scripting Commands ArmA
- Command Group: Object Information
- Scripting Commands ArmA2