Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Bashe

Help with player damage

Recommended Posts

How do I make it so when you take a certain amount of damage, the plaayer will make a different pain noise?

Sort of like with his death noises, but instead with his pain noises.

I've got the sounds I need, I just need to know how to get them in there when he takes a certain amount of damage.

Share this post


Link to post

To eludicate this situattion, I'll make a graph (thingie):

1-24% damage: regular noise
25-49% damage: different noise
50-74% damage: different noise
75%+ damage: different noise

Share this post


Link to post

What port? You can do this with Zdoom, just open up the SNDINFO lump and take a look at the player sounds. I wont explain it, because it will be obvious when you look.

Share this post


Link to post

Yeah, I use ZDoom.

When I opened the SNDINFO up, I saw those sounds, so I gave each pain it's own sound, but it still only used one sound and not them all.

Share this post


Link to post

These are the files that I found in my SNDINFO that may have to do with damage amounts:

player/male/pain100_1
player/male/pain100_2
player/male/pain75_1
player/male/pain75_2
player/male/pain50_1
player/male/pain50_2
player/male/pain25_1
player/male/pain25_2

I altered these, and nothing really happened. It only uses player/male/pain25_1.
If this is not the right thing I'm supposed to alter, correct me.

Share this post


Link to post

$playersound player male *pain100 dsplpain
$playersounddup player male *pain75 *pain100
$playersounddup player male *pain50 *pain100
$playersounddup player male *pain25 *pain100

This block of definitions is copying the normal pain sound across the other three. Did you change that?

Share this post


Link to post

No, all I did was take the sound effect across from the various numbers and changed their names to the corresponding sound.

Like this:

Player/male/pain100_1 dsplpain

Changed it to:

Player/male/pain100_1 dsplpan4

and that didn't work.

Share this post


Link to post

Well, that plan worked, but that was not EXACTLY what I wanted.

What I wanted was how much damage he took was what sound he would make, not whatever precent of health he had was what noise he made...

Share this post


Link to post

Ah well, I suggest you use ACS, although it will be a tough cookie to start with if you havent used it before. It will not be possible to do this sort of thing to apply to existing maps though without modifying them.

Share this post


Link to post

I can't imagine ACS doing this, unless there's something that finds hp of something.

Share this post


Link to post
Epyo said:

I can't imagine ACS doing this, unless there's something that finds hp of something.



Of course there is: GetActorProperty(APROP_HEALTH)!

Share this post


Link to post

Maybe I'll get it...



EVENTUALLY!!!

I'll have to wait until I get my network card so I can get online form my laptop again.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×