CheckIfTargetInLOS

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


bool CheckIfTargetInLOS([double fov[, int flags[, double dist_max[, double dist_close]]]])

Usage

Checks if the Actor's target is in line of sight. For players the target will be the closest actor in front of them.

Parameters

  • fov - 0 by default. If greater than 0, check if the target is within the specified field of view of the Actor.
  • flags - 0 by default. Sets the the flags for the check.
  • dist_max - 0 by default. If greater than 0, sets the range the target must be in.
  • dist_close - 0 by default. If greater than 0, sets the max distance that the JLOSF_CLOSE* flags will be used.

Return value

Returns true if the target was in line of sight.

Examples

Nuvolachalk.png 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.