Front Angle Invulnerability

Moderator: GZDoom Developers

Post Reply
User avatar
black-thrones
Posts: 41
Joined: Sat Nov 16, 2013 11:01 pm

Front Angle Invulnerability

Post by black-thrones »

I'm still trying to make a better Centaur and it seems that it's impossible to make him function the way I want. Best I can do is to utilize an invisible protection actor that melee attackers can get stuck in when it spawns while the centaur's shield is up, or if that protection actor is too far apart from the centaur, melee attackers can still damage him..

Would it be possible to make a flag that makes monsters invulnerable from their front side/facing angle, but still possible to damage from other angles? Similar to the SHIELDREFLECT flag but it offers invulnerability instead of reflecting attacks (SHIELDINVULNERABLE, maybe?).
User avatar
Lord Misfit
Posts: 227
Joined: Wed Dec 27, 2006 8:13 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: Canton, OH
Contact:

Re: Front Angle Invulnerability

Post by Lord Misfit »

Noting my interest in this [or knowing what alternative methods people use to achieve this effect].
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Front Angle Invulnerability

Post by NeuralStunner »

black-thrones wrote:Best I can do is to utilize an invisible protection actor that melee attackers can get stuck in when it spawns while the centaur's shield is up, or if that protection actor is too far apart from the centaur, melee attackers can still damage him..
For the former case, the actor shouldn't be solid. For the latter, I'm not sure what you mean by this.

I always found that the invulnerability was bad enough, but the reflective shield was worse. If you truly want to make a better Centaur, please dispense with the reflective shield entirely. :P

Not that i don't think the suggestion has merit. It would be especially useful for players in mods with shields.
User avatar
black-thrones
Posts: 41
Joined: Sat Nov 16, 2013 11:01 pm

Re: Front Angle Invulnerability

Post by black-thrones »

NeuralStunner wrote:For the former case, the actor shouldn't be solid. For the latter, I'm not sure what you mean by this.
My bad on the latter. I was tired at the time of typing that and re-reading what I entered made me think "why the Hell would a protection sprite be further away from him to begin with?"

As for the former, you're absolutely right. I kept thinking to myself it would then make the shield possible to foil by simply walking into it and then sucker-punching the centaur, but it seems to work fine now that I actually took the time to test this. Just need to make him spawn two additional ones so I won't be able to hurt him at all by the front side. Thank you NeuralStunner.

But I'm keeping my annoying Centaurs ;> Just making him less so, and the main reason behind this was to give players the ability to, for the example of fighters, lob grenades at the wall behind the centaur and get him damaged.

I figured this flag would make it simple for developers to make monsters who raise shields more realistic with ease, rather than just making a monster invincible and impervious to all damage from all angles while they have the shield raised at their target. Maybe that would make sense for protection barrier spells, but not for shields!
I just remembered that making monsters like the Brains enemies from Quake II would be much simpler with this flag.
User avatar
Marinelol
Posts: 69
Joined: Sun Feb 06, 2011 7:37 am
Graphics Processor: nVidia (Modern GZDoom)

Re: Front Angle Invulnerability

Post by Marinelol »

I think I had this in a previous wad http://www.**LINK_DISABLED**.org/download?file= ... ed0.3b.pk3 . You'll have to check it manually I can't access it atm (Too lazy :P). The centaur shield only reflects from the front. Blocks melee attacks and yet the centaur can be hit on his legs.
User avatar
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: Front Angle Invulnerability

Post by Major Cooke »

How many total angles can ZDoom support now? 12? 16? It'll be better if A_SetInvulnerable is expanded upon with optional parameters that you give a range to in degrees (so front would be -45 to 45 for a default 8-set rotation) instead of relying upon sprites. This could also include reflectivity.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Front Angle Invulnerability

Post by Graf Zahl »

Well, don't expect this to work well. Due to having a bounding box any attempt to add angular restrictions are bound to fail dismally because it won't be possible in certain cases to actually calculate the proper point of impact.
User avatar
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: Front Angle Invulnerability

Post by Major Cooke »

Does that include the projectile's offset it's facing when it dies, calculated in with the monster's current angle?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Front Angle Invulnerability

Post by Graf Zahl »

Just imagine two corners colliding. I have absolutely no idea how to calculate a proper collision point for such cases. It's simple if a projectile impacts head-on, but a feature that only works for such cases is essentially broken.
User avatar
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: Front Angle Invulnerability

Post by Major Cooke »

So not even a FOV esque check could work?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Front Angle Invulnerability

Post by Graf Zahl »

No, Due to the box-like shape of both the victim and the projectile there is no way to calculate a proper hit position when both actors collide at odd angles.
User avatar
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: Front Angle Invulnerability

Post by Major Cooke »

Aw that sucks. :(
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”