GetNumCompassHostiles

From GECK
Jump to: navigation, search


A function added by the ShowOff NVSE Plugin.

Description

Returns the amount of hostile compass targets, optionally filtered by maxRange and flags.

If maxRange is unspecified / set to 0, no additional distance check is performed. Otherwise, the actor will have to be within the specified distance (in game Units) to be counted.

flags is a bitmask. If flags is unspecified / set to 0, nothing else happens. Otherwise, additional filters will be applied to the count if certain bits are set.
Possible filter values:

1	No invisible actors

Syntax

[help]
(numCompassHostiles) GetNumCompassHostiles maxRange:float flags:int

Example

int iNum
let iNum := GetNumCompassHostiles

Will return the amount of compass hostiles. Equivalent to `GetNumCompassHostiles 0 0`.

let iNum := GetNumCompassHostiles 500

Will return the amount of compass hostiles that are 500 units from the player. Equivalent to `GetNumCompassHostiles 500 0`.

let iNum := GetNumCompassHostiles 500 1

Will return the amount of compass hostiles that are 500 units from the player and are not invisible.

Notes

  • No invisible actors works by checking if either the actor's Invisibility or Chameleon actor values are greater than 0.

See Also