Page 1 of 2

blood splat and bullet puff sounds

Posted: Wed Jan 16, 2008 7:47 am
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

Re: blood splat and bullet puff sounds

Posted: Wed Jan 16, 2008 9:22 am
by Skippy
[wiki]Classes:BulletPuff[/wiki]

The Wiki is your friend.

Re: blood splat and bullet puff sounds

Posted: Wed Jan 16, 2008 10:47 am
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?

Re: blood splat and bullet puff sounds

Posted: Wed Jan 16, 2008 12:11 pm
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.

Re: blood splat and bullet puff sounds

Posted: Wed Jan 16, 2008 12:41 pm
by Ghastly
Heh, use the Terrain lump.

Re: blood splat and bullet puff sounds

Posted: Thu Jan 17, 2008 11:11 am
by DrewbieDoobie007
Looks like the functionality of this has changed somewhat from what is listed in the WIKI, randy, can we get an explanation?

Re: blood splat and bullet puff sounds

Posted: Thu Jan 17, 2008 3:14 pm
by Skippy
What's the problem exactly?

Re: blood splat and bullet puff sounds

Posted: Fri Jan 18, 2008 8:48 am
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.

Re: blood splat and bullet puff sounds

Posted: Fri Jan 18, 2008 9:17 am
by Skippy
Post your DECORATE.

Re: blood splat and bullet puff sounds

Posted: Mon Jan 21, 2008 9:42 am
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
}
}

Re: blood splat and bullet puff sounds

Posted: Mon Jan 21, 2008 12:50 pm
by XutaWoo
The activesound is commented out, you realize that?

Re: blood splat and bullet puff sounds

Posted: Mon Jan 21, 2008 3:17 pm
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.

Re: blood splat and bullet puff sounds

Posted: Mon Jan 21, 2008 8:06 pm
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.

Re: blood splat and bullet puff sounds

Posted: Mon Jan 21, 2008 11:31 pm
by DrewbieDoobie007
now that is a pro at work, NICE!
only problem is the blood still doesnt make the sound...

Re: blood splat and bullet puff sounds

Posted: Tue Jan 22, 2008 3:15 am
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?