How to play a custom sound effect?

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
daskraut
Posts: 9
Joined: Fri Oct 27, 2017 1:22 pm

How to play a custom sound effect?

Post by daskraut »

Hi, folks!

I'm absolutely new at anything. I'm currently creating my first map (and almost everything works beautifully!) and would like to play a custom sound "SHRO" (="i really should have russian overkill") when crossing a specific line.

I've imported a custom sound (shro.mp3) as demonstrated in https://www.youtube.com/watch?v=Y6WyKChcoYI and created SNDINFO just like the dude said. The entry in SNDINFO is "SHRO SHRO"

However, when i try to play it with a script which shall be executed when crossing a line (Action 80 - Script execute):

Code: Select all

script 3 (void)
{
    PlaySound(0,"SHRO");
}
I get the error message "Function playsound is used but not defined."

What am I doing wrong? How do I play the sound effect?

(I'm using Doom Builder 2.1.2.1553, Slade 3.1.1.5, GZDoom g3.1.0, format is "ZDoom (Doom in Hexen format)")
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: How to play a custom sound effect?

Post by Blue Shadow »

The ACC that's shipped with that version of Doom Builder is old. You need to update it. Download ACC from here. Extract the file's contents into:

Code: Select all

<Doom Builder's directory>/Compilers/ZDoom
Replacing the files in there.
User avatar
daskraut
Posts: 9
Joined: Fri Oct 27, 2017 1:22 pm

Re: How to play a custom sound effect?

Post by daskraut »

Thank you very much, Blue Shadow, doing this solved my problem - the custom sound now plays as intended!

Blue Shadow wrote:The ACC that's shipped with that version of Doom Builder is old. You need to update it. Download ACC from here. Extract the file's contents into:

Code: Select all

<Doom Builder's directory>/Compilers/ZDoom
Replacing the files in there.
Guest

Re: How to play a custom sound effect?

Post by Guest »

Did this and I still can't hear my sound effect what am I doing wrong?

#include "zcommon.acs"

script 1 (void)
{
PlaySound(0,"D_PAY");
}
Post Reply

Return to “Assets (and other stuff)”