CheckSight

From ZDoom Wiki
Jump to navigation Jump to search

bool CheckSight (int source, int dest, int flags)

Usage

This function performs a sight check to see if an actor is (or multiple actors are) within the line of sight of another actor (or other actors). This check is inclusive and returns positive if any actors with either tid have a line of sight between each other. 0 can be used in place of either tid and means the script activator.

Parameters

  • source
TID of the actor(s) doing the searching.
  • dest
TID of the actor(s) to search for.
  • flags
Flags to modify the search behavior. Currently supported flags are:
CSF_NOFAKEFLOORS: Ignores fake floors created by Transfer_Heights.
CSF_NOBLOCKALL: Ignores lines marked "Block Everything". Monsters can see through these lines if there's a chance that shooting them will make them unblock (like scripted breakable glass).

Return value

True if any of the specified actors have a line of sight, or false otherwise.

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.


See also