CheckSight (ZScript)
Usage
Checks to see if there's line of sight to the target. This function is portal aware. Internally this is what A_Look uses to determine whether a monster has seen a player.
Parameters
- target - The Actor to check line of sight to
- flags - Default is 0
- SF_IGNOREVISIBILITY - Check line of sight even if the Actor has the INVISIBLE flag or has a RenderStyle of None
- SF_SEEPASTSHOOTABLELINES - Shootable lines that are set to block everything won't stop the line of sight check. Requires SF_SEEPASTBLOCKEVERYTHING to be useful
- SF_SEEPASTBLOCKEVERYTHING - Non-shootable lines that are set to block everything won't stop the line of sight check
- SF_IGNOREWATERBOUNDARY - See through 3D sectors that are meant to emulate deep water
Return value
Returns true if the target is in line of sight. Returns false otherwise.
Examples
![]() |
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. |
This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.