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.

How to play a custom sound effect?

Postby daskraut » Fri Oct 27, 2017 1:44 pm

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 allExpand view
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)")
User avatar
daskraut
 
Joined: 27 Oct 2017

Re: How to play a custom sound effect?

Postby Blue Shadow » Fri Oct 27, 2017 2:25 pm

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 allExpand view
<Doom Builder's directory>/Compilers/ZDoom

Replacing the files in there.
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: How to play a custom sound effect?

Postby daskraut » Fri Oct 27, 2017 2:40 pm

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 allExpand view
<Doom Builder's directory>/Compilers/ZDoom

Replacing the files in there.
User avatar
daskraut
 
Joined: 27 Oct 2017

Re: How to play a custom sound effect?

Postby Ebenezer Worthingshaw » Sun Feb 14, 2021 7:29 pm

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");
}
Ebenezer Worthingshaw
 


Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 1 guest