findNearestEnemy: Difference between revisions

From Bohemia Interactive Community
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 from the specified position. Returns a null object if the group does not know about any enemies. |= Description
| 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 -->
<dd class="notedate">Posted on January 9, 2007 - 06:13</dd>
<dt class="note">'''[[User:ColonelSandersLite|ColonelSandersLite]]'''</dt><dd class="note"><br>
Returns the nearest enemy the group knows about, not the true nearest enemy.  Returns a null object if the group does not know about any enemies.<br>
</dd>


<!-- Note Section END -->
<!-- Note Section END -->

Revision as of 13:53, 4 September 2008

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

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

Notes

Bottom Section