Getting killed by friendly sentry turret's projectiles

Hello,

I'm making a sentry turret that shoots a mix of fast projectiles and small homing missiles. I've got it mostly worked out, but the only problem remaining is that the said projectiles can kill the player who gets in their way. :)

The sentry turret of course has +FRIENDLY propery set already. +DONTHURTSHOOTER doesn't really work here because it would only protect the turret itself, not the player.

Any ideas?

Share this post


Link to post

+MTHRUSPECIES
A missile with this flag passes through actors of the same species as the actor that shot it, if any.


With this, make the player the same species as the turret, or vice versa.

Share this post


Link to post
D2Jk said:

Any ideas?

On MBF, the FRIEND flag makes them try their best to avoid shooting through you. Maybe it can be implemented in the ZDoom engine too? It's more realistic than projectiles which "ghostily" travel through you.

Share this post


Link to post

You might be able to do something with the recently added A_CheckLOF.

Share this post


Link to post

For now I'm ok with the current implementation, but I will take a look at these suggestions. I'm thinking it might prove too complicated to improve this further, though. Since the shot projectiles do not travel instantaneously, it would be possible to step in front of them just after the line of fire check.

By the way, I was also wondering if it's possible to make a projectile that momentarily reduces the movement speed of hit monsters? I assume it's not possible, and the ice or freeze related functions and properties are probably just used for some weapon effects in some game other than Doom (Hexen?).

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now