A_JumpIfTargetInLOS
From ZDoom Wiki
A_JumpIfTargetInLOS (int offset[, float fov[, bool proj_target*]])
A_JumpIfTargetInLOS (str state[, float fov[, bool proj_target*]])
* (development version only)
| Warning: Using state labels as arguments without quotation marks has been deprecated and will no longer work. Make sure to enclose all your string arguments with quotation marks to ensure full compatibility with future ZDoom versions. Refer to the available example(s) for proper usage |
This can be used with monsters, weapons, projectiles and inventory items.
For monsters, jumps if the monster has a target and can currently see it's target. If FOV is given, it is an angle representing the size (in degrees) of the actor's sight cone. Actors outside of this cone (the center of which is the calling actor's current facing direction) is not considered to be "visible". If omitted, no sight cone is used and instead this function jumps if the view between the caller and the target is unobstructed (the caller can see the target, regardless of facing direction, given there are no walls between the two).
For weapons and inventory, jumps if the player has a suitable line target under their crosshair. With weapons and inventory, FOV is meaningless and can be omitted.
(development version only)
For seeking projectiles, the proj_target parameter is used to determine the actor that the projectile looks for. If this is 0 or omitted, it checks for the actor who fired it. If it's 1, the projectile checks sight with the target it is seeking. If the actor is not a projectile or doesn't have the SEEKER flag set, this parameter is ignored.
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 contibutions are greatly appreciated. |

