LookForEnemies
Jump to navigation
Jump to search
bool LookForEnemies(bool allaround, LookExParams params = null)
Usage
This actor function makes the calling actor look for its enemies. Functions similarly to A_LookEx, but uses a LookExParams struct to determine its behavior instead of arguments.
Parameters
- bool allaround
- If true, the actor will look for targets all around them, ignoring the fov field in LookExParams.
- LookexParams params
- A LookExParams struct with values that will determine the function's behavior.
Return value
- bool — Returns
true
if a target was successfully found. The actor'starget
pointer will be updated to point to the found target.
Examples
An example of how this function can be called:
LookExParams params;
params.fov = 180;
params.flags = LOF_NOSOUNDCHECK;
params.minDist = 0;
params.maxDist = 1024;
params.maxHearDist = 2048;
LookForEnemies(false, params);