Stackable corpses

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
Hey Doomer
Posts: 283
Joined: Sat Sep 25, 2021 3:38 am

Stackable corpses

Post by Hey Doomer »

Ah the problem of "solid" corpses that stack like cordwood.

Well this seems to work:

https://i.postimg.cc/7YYZDNpp/stacked.png

Note the chaingun guy is on top of the others, as the debug boxes show. (His corpse shadow is under the shotgun guy.)

Here's how it works: whenever a thing dies and has health below 1, it spawns a bridge (called Box, but it's basically the InvisibleBridge actor) slightly above the floor. These may or may not overlap depending on x,y collision. The monsters will still always follow x,y paths when chasing and get stuck between or behind these boxes, but this can be changed in DECORATE (my additions in bold):

Actor Zombieman2 : Zombieman Replaces Zombieman
{
States
{
See:
TNT1 A 0 A_CheckProximity("JumpUp","Box",64)
POSS AABBCCDD 4 A_Chase
Loop
JumpUp:
POSS A 0 A_Recoil(-8)
POSS A 0 ThrustThingZ(0,8,0,0)
POSS AABBCCDD 4 A_Chase
Goto See
}
}

This adds a check for any "Box" bridge that spawns and jumps if needed to prevent being stuck, since they seem to prefer wandering around on the x,y axis.

The player will NOT get caught "inside" a monster, which is still a Doom corpse. You just walk "over" them (on the bridges) or shoot the bridges out of the way and the bodies drop.

This is far from perfect and can event look ridiculous. Since radius is fixed "piles" of bodies can look interesting like the above or have orphaned corpses hanging in mid air. It all depends on where bridges collide I think. Maybe there are different ways to tweak the numbers to reduce this, but you get the idea. In any case this works and doesn't affect anything else, including Archie's resurrections.
stackable.pk3
Last edited by Hey Doomer on Tue Sep 28, 2021 11:43 am, edited 1 time in total.
User avatar
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Re: Stackable corpses

Post by Apeirogon »

Whats the question, again?
Hey Doomer
Posts: 283
Joined: Sat Sep 25, 2021 3:38 am

Re: Stackable corpses

Post by Hey Doomer »

Happy to post and didn't intend to suggest anything obvious as a new idea. I am fascinated at what can be done with this engine.

I've read a few threads on this forum stating that "solid" corpses would break collision physics, get players stuck inside monsters, and look stupid. Maybe. Still spawning invisible bridges seems to be one solution. Sprites vs. stepping on the dead is a discussion, I suppose.

https://i.postimg.cc/RFVRNrfW/stacked-2.png
https://i.postimg.cc/5t57XqRR/stacked-3.png
User avatar
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Re: Stackable corpses

Post by Apeirogon »

Scripting subforum is for "I want to do X but I cat/dont know how to do so, help", not for "I made X". Second should go to the general or script library subforum.
Hey Doomer
Posts: 283
Joined: Sat Sep 25, 2021 3:38 am

Re: Stackable corpses

Post by Hey Doomer »

OK dokey. Please delete this one, and I'll post in the other forum. Thanks
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed

Re: Stackable corpses

Post by wildweasel »

Hey Doomer wrote:OK dokey. Please delete this one, and I'll post in the other forum. Thanks
No need, it's already here. :mrgreen:

Return to “Script Library”