findNearestEnemy: Difference between revisions
Jump to navigation
Jump to search
m (reverted to original info) |
m (removed redundant note (same info as description), added example) |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Find the nearest enemy | | Find the nearest enemy to the specified position. Returns a null object if the object's group does not [[knowsAbout|know about]] any enemies. |= Description | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 17: | Line 17: | ||
| [[Object]] |= Return value | | [[Object]] |= Return value | ||
____________________________________________________________________________________________ | |||
|x1= <pre>_myNearestEnemy = (units _myGroup select 0) findNearestEnemy player</pre> |= Example 1 | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 26: | Line 29: | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<!-- Note Section END --> | <!-- Note Section END --> |
Revision as of 12:53, 4 September 2008
Description
- Description:
- Find the nearest enemy to the specified position. Returns a null object if the object's group does not know about any enemies.
- Groups:
- Uncategorised
Syntax
- Syntax:
- object findNearestEnemy position
- Parameters:
- object: Object
- position: Object or Array
- Return Value:
- Object
Examples
- Example 1:
_myNearestEnemy = (units _myGroup select 0) findNearestEnemy player
Additional Information
- See also:
- See also needed
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