Pain sounds don't play

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!
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.

Pain sounds don't play

Postby olzhas1one » Wed Feb 13, 2019 3:29 am

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 11:13 am, edited 1 time in total.
User avatar
olzhas1one
 
Joined: 26 Feb 2017
Discord: olzhas1one #1997

Re: Pain sounds don't play

Postby olzhas1one » Wed Feb 13, 2019 3:30 am

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
User avatar
olzhas1one
 
Joined: 26 Feb 2017
Discord: olzhas1one #1997

Re: Pain sounds don't play

Postby Blue Shadow » Wed Feb 13, 2019 7:45 am

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
Blue Shadow
 
 
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Pain sounds don't play

Postby olzhas1one » Mon Feb 25, 2019 11:13 am

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
olzhas1one
 
Joined: 26 Feb 2017
Discord: olzhas1one #1997

Re: Pain sounds don't play

Postby wildweasel » Mon Feb 25, 2019 11:20 am

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.
User avatar
wildweasel
「お前はもうトースト」[you are already toast.]
Moderator Team Lead
 
Joined: 15 Jul 2003


Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 0 guests