Structs:LookExParams

From ZDoom Wiki
Jump to navigation Jump to search
Note: This feature is for ZScript only.


LookExParams is a struct that contains information that can be used by various Look functions such as LookForEnemies, LookForPlayers and LookForTid. Functions like A_LookEx utilize this struct internally but it cannot be passed to them directly.

Variables

  • double Fov
Field of vision for the looking.
  • double minDist
Minimum sight distance in map units. If greater than 0, the calling actor will not see the potential target is closer than this. If this is smaller than the calling actor's radius, it won't wake up upon being touched by an enemy.
  • double maxDist
Maximum sight distance in map units. The calling actor will not see potential targets beyond it.
  • double maxHeardist
Maxiumum hearing distance. The calling actor will not react to sounds produced by the potential target beyond this distance.
  • int flags
Same as A_LookEx flags:
  • LOF_NOSIGHTCHECK — do not process sight checks (makes monster blind).
  • LOF_NOSOUNDCHECK — do not process sound target checks (makes monster deaf).
Note: this is not the same as using AMBUSH: When the AMBUSH flag is specified for a monster, if the player makes a sound in the same room (and in range of the monster if maxheardist is set), the monster will react to the player if they walk within the monster's current line of sight, regardless of the direction it is facing (FOV is ignored). This flag will make the monster completely deaf, preventing it from reacting to the player at all, regardless of the sounds they make.
  • LOF_DONTCHASEGOAL — do not leave to chase after a goal from this state, even if the actor has one. This can be used to prevent a monster from breaking from its idle animations to walk over to a goal.
  • LOF_NOSEESOUND — do not play the actor's sight sound if it wakes up from this state.
  • LOF_FULLVOLSEESOUND — Play the see sound globally at full volume (like a boss).
  • LOF_NOJUMP — acquire a target, but do not jump to any other state, allows to check the target and jump manually into the See state based on conditions without interrupting the idle animation.
  • State seestate
The State pointer to jump to.

See also