Pain sounds don't play

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Post Reply
User avatar
olzhas1one
Posts: 70
Joined: Sun Feb 26, 2017 6:29 am

Pain sounds don't play

Post by olzhas1one »

I'm trying to add an enemy to my mod and I used the default shotgunguy code, but his pain sounds dont work at all. I tried re-writing the PainSound thing, changed the SNDINFO code, I tried changing the sound's format, even completely rewriting the entire actor - NOTHING WORKED. I give up, I don't know what to do, I'm clueless. Here's the code:

DECORATE:

PainSound "sherrifpain"


SNDINFO

sherrifpain sherrifpain (I tried giving it both the same names - no result. It didnt work with different definitions neither)

I would send the entire code, but we have no WiFi right now, so I have to send this from my phone and not directly from PC. Please help guys, this is driving me nuts
Last edited by olzhas1one on Mon Feb 25, 2019 10:13 am, edited 1 time in total.
User avatar
olzhas1one
Posts: 70
Joined: Sun Feb 26, 2017 6:29 am

Re: Pain sounds don't play

Post by olzhas1one »

Forgot to add: I didn't touch the pain code for the monster, and A_PlaySound didn't work either. I'm using the latest GZDoom version and this has happened to me before
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Pain sounds don't play

Post by Blue Shadow »

Try shortening the name of the sound file/lump so that it's 8 characters or less in length (don't forget to update the SNDINFO accordingly).
User avatar
olzhas1one
Posts: 70
Joined: Sun Feb 26, 2017 6:29 am

Re: Pain sounds don't play

Post by olzhas1one »

Alright, so my goal is a bit different, but the problem is exactly the same.
This time it won't play an ACS sound
ACS code:

#include "zcommon.acs"

script 1 enter
{
Playsound (1,"M1L1",chan_body,1.0,false,ATTN_NONE);
}

SNDINFO:

M1L1 M1L1

The sound format is .ogg

Shortening didn't help. The idea is to have the player actor play the soundfile when the level starts. I am new to ACS, but I assume the code should work fine and its the weird sound issue again. What am I doing wrong?
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Pain sounds don't play

Post by wildweasel »

If you haven't specifically set the player's TID to 1, that may be why it's not playing. Set it to 0, and the sound will play on the script's activator, which for an ENTER script, is the player. Granted this will have the side-effect of having the sound play on every player in a multiplayer game, I believe.
Post Reply

Return to “Assets (and other stuff)”