LookForEnemiesEx
Jump to navigation
Jump to search
(development version 9df656a only)
int LookForEnemiesEx (out Array<Actor> targets, double range = -1, bool noPlayers = true, bool allaround = false, LookExParams params = null)
Usage
Returns an array with every enemy of the caller found in the specified range, using the same checks as LookForEnemies. Allowing for far more fine tuned enemy search functions.
Parameters
- out Array<Actor> targets
- An array passed by reference as an input for LookForEnemiesEx(), it is filled with the targets' the function finds.
- double range
- The range in which the function will look for valid enemies, in map units. Default is -1, which means the range is the callers' FriendlySeeBlocks*128 (The size of the blockmap grid).
- bool noPlayers
- If enabled, this function will not look for any hostile players found in range of the caller. Default is true.
- bool allaround
- If true, the actor will look for targets all around them, ignoring the fov field in LookExParams. Default is false.
- LookexParams params
- A LookExParams struct with values that will determine the function's behavior.
Return value
- Array <Actor> — Not an actual return, but the targets array passed into the function is what is filled with pointers to the valid targets the function finds, allowing the array to then be used as desired.
- int — Returns the amount of valid enemies that the function found.
Examples
![]() |
Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated. |