Player Hurt Sound Won't Play

Hi! Hopefully someone can help me.
When the player of my game takes damage, the player hurt sound will not play.
This is not an issue with the sound itself, as the same sound is used for other things (such as player death) and works fine in those cases.
For some reason, the sound simply will not play when the player takes damage. Does anyone have an idea why?
Any and all help is appreciated, and thanks in advance! :)
 
dale_coop said:
Hmmm.... could you share your Handle Player Hurt script?

Of course! Just so you know, I changed the sound to "get" because that's also the hurt sound, but that isn't why it isn't working, I just did that to see if it might fix the problem.
 

Attachments

  • HandlePlayerHurt.zip
    778 bytes · Views: 43

Raftronaut

Member
The script you are using here has the sound effect line:
PlaySound #SND_HURT_PLAYER

If you changed the player death sound in the nesmaker SFX tree to GET, you'll need to change the code in your script to the following:
Playsound #SND_GET

play sound.PNG

That should fix it
 
Raftronaut said:
The script you are using here has the sound effect line:
PlaySound #SND_HURT_PLAYER

If you changed the player death sound in the nesmaker SFX tree to GET, you'll need to change the code in your script to the following:
Playsound #SND_GET

play sound.PNG

That should fix it

Sadly tried this already, didn't seem to help. Thank you though. Also important not, I was wrong-- it is not that same sound as player death, it is the same sound as MONSTER death.
 

dale_coop

Moderator
Staff member
Because that line:
Code:
	PlaySound #SND_HURT_PLAYER
Should be way lower...
For example, at the end, just before the line:
Code:
doneWithPlayerHurt:

Like this:
Code:
	PlaySound #SND_HURT_PLAYER

doneWithPlayerHurt:
 
dale_coop said:
Because that line:
Code:
	PlaySound #SND_HURT_PLAYER
Should be way lower...
For example, at the end, just before the line:
Code:
doneWithPlayerHurt:

Like this:
Code:
	PlaySound #SND_HURT_PLAYER

doneWithPlayerHurt:

Thank you dale, this fixed the issue! :)
 
Top Bottom