[DECORATE] Blocking AOE damage?

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
FranckyFox2468
Forum Regular
Posts: 180
Joined: Sat May 07, 2016 8:30 pm

[DECORATE] Blocking AOE damage?

#1

Post by FranckyFox2468 » Mon Oct 02, 2017 8:55 pm

This question involves things like A_Explode and such.

I noticed that damages coming from rockets and general AOE will go through ALL actors that can take damage within its area, and its fine.

But is there a way to make a certain actor block the AOE effect if it is behind another one that has the ability to block it? Like a much larger actor or a barrier or of some sort?

Konda
Forum Regular
Posts: 487
Joined: Thu Jun 07, 2012 5:22 pm

[DECORATE] Re: Blocking AOE damage?

#2

Post by Konda » Mon Oct 02, 2017 9:50 pm

Nope. Your best bet is reinventing the explosion mechanics via ACS... First you need to have information about all actors within the explosion radius. So what you could do is spawn an actor in the explosion center that calls A_RadiusGive with a radius matching the explosion radius. Then the item it's supposed to give should be a CustomInventory and use +AUTOACTIVATE. Then in the Use state of that inventory item you call another ACS script (via ACS_ExecuteAlways) which should somehow let the explosion script know the positions of each actor that executes that script, and then do some math based on the radius of each actor (if you can even retrieve the radius of an actor, I'm not sure about that) to determine which of the actors will be damaged.....
When I talked about making the explosion script "communicate" with the other script, I meant it in a vague way, but essentially you need to figure out how to choose which actor to damage and which not to, with the 2 scripts I mentioned. The part where the damaging of the actor can be in either of the 2 scripts, and you'll also have to figure out how to set the "owner" of the explosion to the actor which tried to explode this way, so players can be awarded frags, etc. if they use a weapon which incorporates this explosion behavior.

Unless you're 100% sure you have the skils to pull this off (assuming some of the steps I mentioned are even possible to perform), or know someone who can do this, it's best to suck it up and deal w/it....

Catastrophe
Retired Staff / Community Team Member
Posts: 2558
Joined: Sat Jun 02, 2012 2:44 am

[DECORATE] Re: Blocking AOE damage?

#3

Post by Catastrophe » Tue Oct 03, 2017 2:57 am

No without some heavy ACS and to some extent, DECORATE hackery.

User avatar
FranckyFox2468
Forum Regular
Posts: 180
Joined: Sat May 07, 2016 8:30 pm

[DECORATE] Re: Blocking AOE damage?

#4

Post by FranckyFox2468 » Tue Oct 03, 2017 1:59 pm

Uh... think ill just pass then. Thanks for the info guys ^^'

Konda
Forum Regular
Posts: 487
Joined: Thu Jun 07, 2012 5:22 pm

[DECORATE] Re: Blocking AOE damage?

#5

Post by Konda » Tue Oct 03, 2017 7:11 pm

Gotta love zdoom. A simple idea like this and a man has to jump through hoops to get it to work.

User avatar
Ivan
Addicted to Zandronum
Posts: 2219
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

[DECORATE] Re: Blocking AOE damage?

#6

Post by Ivan » Tue Oct 03, 2017 8:54 pm

Konda wrote:
Tue Oct 03, 2017 7:11 pm
Gotta love zdoom. A simple idea like this and a man has to jump through hoops to get it to work.
It's still doable the same way in ACS. You still have to check through all actors, check if there's anything in front of them facing towards the explosion. For added complexity and level of depth, you can compare if the actor in question (the blocking one) has a big enough radius to cover all of the explosion, or only part of it. All of this is still not too hard to do with ACS. Things to do:

1. Make sure all actors have a TID.
2. When an actor that's supposed to do explosion damage hits something, run a script, checking all actors. (This part will pretty much imitate an A_Explode call)
3. Run your explosion damage logic.
4. Deal damage accordingly.

Edge cases would have to be walls. However, for walls, you can use some decorate tricks for sight checks I think. Pretty much your only problem will be thin walls.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

Catastrophe
Retired Staff / Community Team Member
Posts: 2558
Joined: Sat Jun 02, 2012 2:44 am

[DECORATE] Re: Blocking AOE damage?

#7

Post by Catastrophe » Tue Oct 03, 2017 10:56 pm

Ivan wrote:
Tue Oct 03, 2017 8:54 pm
Konda wrote:
Tue Oct 03, 2017 7:11 pm
Gotta love zdoom. A simple idea like this and a man has to jump through hoops to get it to work.
It's still doable the same way in ACS. You still have to check through all actors, check if there's anything in front of them facing towards the explosion. For added complexity and level of depth, you can compare if the actor in question (the blocking one) has a big enough radius to cover all of the explosion, or only part of it. All of this is still not too hard to do with ACS. Things to do:

1. Make sure all actors have a TID.
2. When an actor that's supposed to do explosion damage hits something, run a script, checking all actors. (This part will pretty much imitate an A_Explode call)
3. Run your explosion damage logic.
4. Deal damage accordingly.

Edge cases would have to be walls. However, for walls, you can use some decorate tricks for sight checks I think. Pretty much your only problem will be thin walls.
You're still proving his point.

User avatar
Ivan
Addicted to Zandronum
Posts: 2219
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

[DECORATE] Re: Blocking AOE damage?

#8

Post by Ivan » Wed Oct 04, 2017 1:12 am

Catastrophe wrote:
Tue Oct 03, 2017 10:56 pm
Ivan wrote:
Tue Oct 03, 2017 8:54 pm
Konda wrote:
Tue Oct 03, 2017 7:11 pm
Gotta love zdoom. A simple idea like this and a man has to jump through hoops to get it to work.
It's still doable the same way in ACS. You still have to check through all actors, check if there's anything in front of them facing towards the explosion. For added complexity and level of depth, you can compare if the actor in question (the blocking one) has a big enough radius to cover all of the explosion, or only part of it. All of this is still not too hard to do with ACS. Things to do:

1. Make sure all actors have a TID.
2. When an actor that's supposed to do explosion damage hits something, run a script, checking all actors. (This part will pretty much imitate an A_Explode call)
3. Run your explosion damage logic.
4. Deal damage accordingly.

Edge cases would have to be walls. However, for walls, you can use some decorate tricks for sight checks I think. Pretty much your only problem will be thin walls.
You're still proving his point.
No, my point is that you're still going to have to jump through the same hoops. The only difference is that there'll be some boilerplate code. That's all, and that's the easy part. The tough part is common to both methods.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

User avatar
Ænima
Addicted to Zandronum
Posts: 3523
Joined: Tue Jun 05, 2012 6:12 pm

[DECORATE] Re: Blocking AOE damage?

#9

Post by Ænima » Sun Oct 08, 2017 12:14 pm

ZDoom doesn't have A_Nailbomb from SMMU (which basically fires many hitscans in a horizontal radius from the calling actor), BUT A_Explode does have a "nails" argument which should be supported by Zan3.0 although i've never tried it for myself.

https://zdoom.org/wiki/A_Explode

(the 6th and 7th arguments)
­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
Doom64: Unabsolved: New weapons, monsters, and gameplay features for coop !


ZandroSkins
: a pack made by our community

Post Reply