Mewdoom Posted October 11, 2016 Hello guys, let say I have a monster that attack the player from lower floor than the player is, there is a way to make the monster check to see if he have enough sight to attack ? I want him to fly up a bit if his fireball would hit the wall instead of the player ? 0 Quote Share this post Link to post
Graf Zahl Posted October 11, 2016 A simple line of sight check won't help here. The monster is already doing that but because the size of the projectile is greater than 0 it hits the obstacle at a position that is actually below the real line of sight. 0 Quote Share this post Link to post
Mewdoom Posted October 12, 2016 I see, there is a way to check the z of a target ? 0 Quote Share this post Link to post
scifista42 Posted October 12, 2016 A monster just can't reliably predict whether its projectile would hit something on its way towards the player, don't even bother. Something like the monster spawning dummy actors slightly above and below its own eye level, that would check their own line of sight with the monster's target, and report it to the monster somehow, so that the monster would decide whether or not to fire the projectile or whether to move before doing so - might work (although I'm not sure about it), but even if it was possible (and it'd be rather elaborate already), it'd certainly not be foolproof anyway, because it couldn't check for solid things in the path, or moving floors or ceilings that don't obstruct the path yet but will obstruct it a second later, or it'd fail if the target quickly moved into cover just after the check was performed but just before the monster actually fired, and probably more. 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.