blood splat and bullet puff sounds

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
DrewbieDoobie007
Posts: 171
Joined: Thu Jul 24, 2003 8:12 pm
Location: Shelton, Nebraska, USA

blood splat and bullet puff sounds

Post by DrewbieDoobie007 »

I have an old way of doing this using DEHACKED but it would seem that is not the way to do things anymore, now my blood splats and bullet puffs no longer make the correct sounds. I could use some help here, there must be a better way of acheiving this in DECORATE.


this is what I use in DEHACKED.lmp, and the entries in SNDINFO are all correct
puff/ric is the sound of it hitting a wall
puff/clang is the sound of it hitting a barrel or actor
splat/thump is the sound of a bullet hitting a bleeding actor

Code: Select all

Thing 38 (Bullet Puff)
Attack sound = PUFF/RIC
Alert sound = PUFF/CLANG

Thing 39 (Blood Splat)
Pain sound = SPLAT/THUMP
User avatar
Skippy
Posts: 695
Joined: Sun Nov 20, 2005 9:57 am
Location: Belfast, NI

Re: blood splat and bullet puff sounds

Post by Skippy »

[wiki]Classes:BulletPuff[/wiki]

The Wiki is your friend.
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Re: blood splat and bullet puff sounds

Post by Ghastly »

I've tried the seesound, and it's apparantly for hitting a non-bleeding actor (though if one isn't defined, it uses the attacksound). Which one's for hitting a bleeding actor?
User avatar
DrewbieDoobie007
Posts: 171
Joined: Thu Jul 24, 2003 8:12 pm
Location: Shelton, Nebraska, USA

Re: blood splat and bullet puff sounds

Post by DrewbieDoobie007 »

NICE! I was looking for that, thank you! Let the modding begin.
I really need to keep up to date on this stuff, I still need to find out how to make my water and other splashes to work again.
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Re: blood splat and bullet puff sounds

Post by Ghastly »

Heh, use the Terrain lump.
User avatar
DrewbieDoobie007
Posts: 171
Joined: Thu Jul 24, 2003 8:12 pm
Location: Shelton, Nebraska, USA

Re: blood splat and bullet puff sounds

Post by DrewbieDoobie007 »

Looks like the functionality of this has changed somewhat from what is listed in the WIKI, randy, can we get an explanation?
User avatar
Skippy
Posts: 695
Joined: Sun Nov 20, 2005 9:57 am
Location: Belfast, NI

Re: blood splat and bullet puff sounds

Post by Skippy »

What's the problem exactly?
User avatar
DrewbieDoobie007
Posts: 171
Joined: Thu Jul 24, 2003 8:12 pm
Location: Shelton, Nebraska, USA

Re: blood splat and bullet puff sounds

Post by DrewbieDoobie007 »

from the wiki:
Bullet puff used for hitscan attacks in Doom.




Using in DECORATE
The behavior of a bullet puff depends on the result of the hitscan attack that uses it:

missed
activesound is played. Additionally, if ALWAYSPUFF flag is set, Crash state sequence is entered.
hit wall
attacksound is played and Crash state sequence is entered.
hit actor
seesound is played and if the actor is not shootable Spawn state sequence is entered (for melee attack Melee state sequence is entered instead).
If the actor is shootable (none of the flags NOBLOOD, INVULNERABLE, DORMANT are set), blood is spawned instead of the puff.
If A_BulletAttack, A_CustomBulletAttack, A_FireBullets or A_CustomPunch is used, the puff's damagetype property defines the hitscan attack's damage type.
note: If no Crash or Melee state sequence is defined, Spawn state sequence is entered by default.

note: If ALLOWPARTICLES flag is set the puff can be replaced by particles (depends on user settings).


BulletPuff (and inherited actors) also move up 1 mappixel per tic.
I used to be able to have different sounds for if the puff occurred on a non-bleeding actor, or a bleeding actor, now I no longer get to do that.
seesound is played even with blood is spawned instead of the puff. So if I have this set up to make a bullet on metal sound for when a bullet hits a non shootable actor, I still get a bullet on metal noise when the bullet hits a bleeding actor.
User avatar
Skippy
Posts: 695
Joined: Sun Nov 20, 2005 9:57 am
Location: Belfast, NI

Re: blood splat and bullet puff sounds

Post by Skippy »

Post your DECORATE.
User avatar
DrewbieDoobie007
Posts: 171
Joined: Thu Jul 24, 2003 8:12 pm
Location: Shelton, Nebraska, USA

Re: blood splat and bullet puff sounds

Post by DrewbieDoobie007 »

Code: Select all

actor NewBulletPuff : BulletPuff replaces BulletPuff
{
  spawnid 131
  renderstyle Translucent
  alpha 0.5
  //activesound "puff/clang" (puff clang is supposed to be a bullet hitting a non shootable actor, say a barrel for instance. According the the wiki, activesound is the only other assignable sound, doesnt work
  attacksound "puff/ric" //this works correctly, ricochet sound off wall
  seesound "splat/thump" //this works for shootable actors, but now when you hit a barrel it also sounds like it's hitting flesh instead of metal, it no longer discerns between the two.
  +NOBLOCKMAP
  +NOGRAVITY
  +ALLOWPARTICLES
  states
  {
  Spawn:
    PUFF A 4 bright
    PUFF B 4
  Melee:
    PUFF CD 4
    stop
}
}
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: blood splat and bullet puff sounds

Post by XutaWoo »

The activesound is commented out, you realize that?
User avatar
DrewbieDoobie007
Posts: 171
Joined: Thu Jul 24, 2003 8:12 pm
Location: Shelton, Nebraska, USA

Re: blood splat and bullet puff sounds

Post by DrewbieDoobie007 »

this isnt my FIRST time editing these things, it doesnt work while it is active, I have it commented out here because it serves no function.
User avatar
Skippy
Posts: 695
Joined: Sun Nov 20, 2005 9:57 am
Location: Belfast, NI

Re: blood splat and bullet puff sounds

Post by Skippy »

The Wiki is indeed a little unclear on this, but what you're describing is consistent with the instructions given there.

Your problem is twofold. Firstly, the NewBulletPuff actor will always play the SeeSound when it hits an actor, wether it's a bleeding actor or not. Therefore you're unable to stop the 'splat/thump' sound from being played if you define it as the puff's SeeSound.

However, your very first post makes the solution to this problem obvious: define the 'splat/thump' sound as a property of the blood splat actor, not the NewBulletPuff. In this case, setting the Blood actor's PainSound to 'splat/thump' should work (but I haven't tested that). Leave the SeeSound property of the NewBulletPuff blank. The only downside to this is that you'll be stuck with one 'splat' sound for all enemies and weapons (unless you start messing around with custom damagetypes and pain states).

That then leaves us with the problem of not having an impact sound for hitting an actor, bleeding or not. You've compounded the problem by not defining a Crash state for NewBulletPuff, which the Wiki clearly states is the prioritized state for hitting a wall. Having the Crash state take care of wall impacts (using a call to A_PlaySound to play the relevant ricochet sounds) frees up the Spawn state for the only other instance that requires it: hitting a non-bleeding actor!

We'll get rid of the Melee state in NewBulletPuff; you should define custom puffs for your melee attacks separately.

Here's the modified code:

Code: Select all

actor NewBulletPuff : BulletPuff replaces BulletPuff
{
  spawnid 131
  renderstyle Translucent
  alpha 0.5
  // no sound properties defined here
  +NOBLOCKMAP
  +NOGRAVITY
  +ALLOWPARTICLES
  states
  {
  Spawn:          // hits a non-bleeding actor
    TNT1 A 0          // function calls in the first frame of the state are never executed
    TNT1 A 0 A_PlaySound("puff/clang")          // plays the 'clang' sound
    PUFF A 4 bright
    PUFF B 4
    Goto Melee+2          // emulates fall-through of original BulletPuff actor without playing the melee sound separately
  Melee:          // melee attack a non-bleeding actor
   TNT1 A 0
   TNT1 A 0 A_PlaySound(// insert generic melee attack sound here)
   PUFF CD 4
   Stop
  Crash:          // hits a wall
    TNT1 A 0
    TNT1 A 0 A_PlaySound("puff/ric")          // plays the ricochet sound
    PUFF A 4 bright
    PUFF B 4
    Goto Melee+2
}
}

actor NewBlood : Blood replaces Blood   {
   painsound "splat/thump"          // played upon spawning (i.e. attack hits a bleeding actor)
}
Give that a try and see what works for you.

EDIT: put the Melee state back in, just in case you don't want to define custom puffs for melee attacks.
User avatar
DrewbieDoobie007
Posts: 171
Joined: Thu Jul 24, 2003 8:12 pm
Location: Shelton, Nebraska, USA

Re: blood splat and bullet puff sounds

Post by DrewbieDoobie007 »

now that is a pro at work, NICE!
only problem is the blood still doesnt make the sound...
User avatar
Skippy
Posts: 695
Joined: Sun Nov 20, 2005 9:57 am
Location: Belfast, NI

Re: blood splat and bullet puff sounds

Post by Skippy »

You're not using NashGore or some other mod that replaces/edits the Blood actor, are you? And have you tried making 'splat/thump' the SpawnSound of the Blood actor instead of the PainSound?
Locked

Return to “Editing (Archive)”