Different sounds for different pain types?

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.
Locked
LedIris
Posts: 362
Joined: Tue Oct 29, 2013 10:14 am

Different sounds for different pain types?

Post by LedIris »

For example, having the sounds of bones breaking when suffering from falling damage, or burning sounds when in lava. Is this possible?
User avatar
Seekay
Posts: 19
Joined: Thu Feb 25, 2016 2:04 pm
Location: Germany

Re: Different sounds for different pain types?

Post by Seekay »

Sure, you can make multiple Pain states, in them you can just put A_PlaySound("yourcool/newpainsounds").

Some examples are shown here:

http://zdoom.org/wiki/Custom_damage_types

Not entirely sure about environmental damage like lava or falling damage though, I never really worked with this stuff. But for custom projectiles, absolutely.

Edit: http://zdoom.org/wiki/Damage_types

I guess you can make Pain states for Falling and Slime and the like.
LedIris
Posts: 362
Joined: Tue Oct 29, 2013 10:14 am

Re: Different sounds for different pain types?

Post by LedIris »

Seekay wrote:Sure, you can make multiple Pain states, in them you can just put A_PlaySound("yourcool/newpainsounds").

Some examples are shown here:

http://zdoom.org/wiki/Custom_damage_types

Not entirely sure about environmental damage like lava or falling damage though, I never really worked with this stuff. But for custom projectiles, absolutely.

Edit: http://zdoom.org/wiki/Damage_types

I guess you can make Pain states for Falling and Slime and the like.
Awesome. Thanks, I greatly appreciate it :D
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: Different sounds for different pain types?

Post by randi »

Pain sounds can be specialized for specific damage types by appending -damagetype to the end of the normal pain sound. e.g.
  • *pain25 becomes *pain25-Lava
  • *pain50 becomes *pain50-Lava
  • *pain75 becomes *pain75-Lava
  • *pain100 becomes *pain100-Lava
  • *pain becomes *pain-Lava (which is probably enough for you, since hardly anybody bothers with health-based pain sounds)
Define the sounds in SNDINFO, and they will be used when damaged by Lava.
LedIris
Posts: 362
Joined: Tue Oct 29, 2013 10:14 am

Re: Different sounds for different pain types?

Post by LedIris »

randi wrote:Pain sounds can be specialized for specific damage types by appending -damagetype to the end of the normal pain sound. e.g.
  • *pain25 becomes *pain25-Lava
  • *pain50 becomes *pain50-Lava
  • *pain75 becomes *pain75-Lava
  • *pain100 becomes *pain100-Lava
  • *pain becomes *pain-Lava (which is probably enough for you, since hardly anybody bothers with health-based pain sounds)
Define the sounds in SNDINFO, and they will be used when damaged by Lava.
I didn't know you could do that :) Thank you for showing me this technique!
Locked

Return to “Editing (Archive)”