Issues with custom death animation

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
HellBlade64
Posts: 48
Joined: Tue May 13, 2014 3:00 pm

Issues with custom death animation

Post by HellBlade64 »

Still working on my Hard Doom mod. Next issue in line:

I'm trying to add a custom violent death animation for the player where they are torn in half by an explosion.
The effect I'm trying to achieve is (and so far the actors are set up) is that the disembodied torso is launched backwards from the legs.
What I am having trouble with is getting the torso to fly backwards and land.
So far I have gotten it to separate from the legs correctly, but the torso just kind of flops to the ground.
Jarewill
 
 
Posts: 1853
Joined: Sun Jul 21, 2019 8:54 am

Re: Issues with custom death animation

Post by Jarewill »

Do you mind showing your current code?

And what exactly are you trying to do? Are you trying to:
1) Spawn a torso actor and make it fly backwards without moving the player camera, or
2) Spawn a legs actor and make the player camera fly backwards?
User avatar
HellBlade64
Posts: 48
Joined: Tue May 13, 2014 3:00 pm

Re: Issues with custom death animation

Post by HellBlade64 »

Jarewill wrote:Do you mind showing your current code?

And what exactly are you trying to do? Are you trying to:
1) Spawn a torso actor and make it fly backwards without moving the player camera, or
2) Spawn a legs actor and make the player camera fly backwards?
Sure, I'll share the current code I have jotted down for it. :P
Spoiler:
Note that "TestMarine" is a dummy marine actor I made so I could test the animation quickly without random chance getting in the way of whether I'd see it or not.
Currently the torso is dropped by A_SkullPop. Basically I'm trying to achieve a Heretic/Hexen style gibbing effect where your head gets disconnected from your body.
I want the player camera to be attached to the torso.
Jarewill
 
 
Posts: 1853
Joined: Sun Jul 21, 2019 8:54 am

Re: Issues with custom death animation

Post by Jarewill »

I compared it to Heretic's BloodySkull and added the flags that were missing and it seemed to work.
The flags in question:
Spoiler:
However, I found it to be not extreme enough, so I used A_ChangeVelocity.
This doubles the torso speed:
Spoiler:
User avatar
HellBlade64
Posts: 48
Joined: Tue May 13, 2014 3:00 pm

Re: Issues with custom death animation

Post by HellBlade64 »

Almost there!
The only thing is when the skullpop happens, the torso still has more vertical momentum than horizontal.
Jarewill
 
 
Posts: 1853
Joined: Sun Jul 21, 2019 8:54 am

Re: Issues with custom death animation

Post by Jarewill »

All that would be needed to do is change velx*2,vely*2 into a bigger number in A_ChangeVelocity.
For example velx*4,vely*4 would double the horizontal velocity even further, quadrupling it.
User avatar
HellBlade64
Posts: 48
Joined: Tue May 13, 2014 3:00 pm

Re: Issues with custom death animation

Post by HellBlade64 »

I'm not sure that will work.
I misspoke in my last reply. It's not that it has no momentum ever, just when it is summoned from A_SkullPop.
If I summon the MarineTorso actor directly from the console command it flies as it normally should.
But when it comes from A_SkullPop it seems to only use the BloodySkull's physics.
User avatar
HellBlade64
Posts: 48
Joined: Tue May 13, 2014 3:00 pm

Re: Issues with custom death animation

Post by HellBlade64 »

Also I'm not sure whether there's a solution for this, but the MarineTorso's armor doesn't inherit it's color from the player's custom settings and stays the default green.
Can that be changed?
Jarewill
 
 
Posts: 1853
Joined: Sun Jul 21, 2019 8:54 am

Re: Issues with custom death animation

Post by Jarewill »

Not sure what can be done about that then.
Neither about the player translations.

But I have made an experiment not using A_SkullPop:
Spoiler:
Post Reply

Return to “Scripting”