CheckIfTargetInLOS
bool CheckIfTargetInLOS([double fov[, int flags[, double dist_max[, double dist_close]]]])
Note: This feature is for ZScript only. |
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
![]() |
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.