replacing blood splatters

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

replacing blood splatters

Post by Hidden Hands »

The doom games obviously spawn spurts of blood when you shoot monsters. How would I go about replacing these with my own? I cannot seem to find definitions or any way to replace them. Can it be done with DECORATE or ZSCRIPT and if so, how would I do this?

Thanks in advance.
User avatar
Logan MTM
Posts: 678
Joined: Mon Jan 16, 2006 8:53 pm
Location: Rio de Janeiro - Brazil

Re: replacing blood splatters

Post by Logan MTM »

This is what i do:

Code: Select all

ACTOR LOSBloodSplatter : BloodSplatter replaces BloodSplatter
{...
In this case:

Code: Select all


ACTOR YourBloodSplatter : BloodSplatter replaces BloodSplatter
{...
The Doc: https://zdoom.org/wiki/Classes:BloodSplatter
Jarewill
 
 
Posts: 1855
Joined: Sun Jul 21, 2019 8:54 am

Re: replacing blood splatters

Post by Jarewill »

Logan MTM wrote:This is what i do:
While BloodSplatter is a valid replaceable class, I don't think that's what the OP was asking for.

Hidden Hands, were you asking how to replace decals that show up on walls when you hit monsters, or the blood sprites that fly out?
For decals, you should look how Nash did it.
For sprites, replace the Blood class. BloodSplatter also works, but that one only shows up if hit by a +BLOODSPLATTER projectile.
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: replacing blood splatters

Post by Hidden Hands »

If I replace the BLOOD class, I'm a little confused about it. Where are the sprites for the blood actually stored? They certainly aren't in the doom WAD right? I also can't find em in GZDOOM either?
Jarewill
 
 
Posts: 1855
Joined: Sun Jul 21, 2019 8:54 am

Re: replacing blood splatters

Post by Jarewill »

The blood sprites are indeed in the Doom wads.
They are named BLUDA0, BLUDB0 and BLUDC0.

If you don't need to specify custom behavior, you can just replace the sprites and leave the class alone.
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: replacing blood splatters

Post by Hidden Hands »

Ah ok, so one last question. In the DECORATE code for BLUD it has this:

Code: Select all

  Spray:
    SPRY ABCDEF 3
    SPRY G 2
What is SPRY? That's a sprite? Because the BLUD sprites are all thats needed I thought but I'm trying to understand it is all.
Jarewill
 
 
Posts: 1855
Joined: Sun Jul 21, 2019 8:54 am

Re: replacing blood splatters

Post by Jarewill »

Those are Strife-specific sprites and state, as the wiki says:
Wiki wrote:If the game is Strife, and damage is greater then 13, it shifts to the Spray state (if it exists), otherwise it adds 2 to the damage check for the previous checks.
If you don't include those sprites, then it won't jump to this state.
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: replacing blood splatters

Post by Hidden Hands »

Ah ok cool. Thank you for all your help :).
Post Reply

Return to “Scripting”