Struggling To Add Sounds

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.
DukeNukem
Posts: 5
Joined: Sun Apr 07, 2024 6:57 am
Preferred Pronouns: No Preference

Struggling To Add Sounds

Post by DukeNukem »

Hi,

Despite some time trawling the forum / google / wiki I'm completely failing to import custom sounds and just don't know why.

Taking an example, I have downloaded thunder effects from https://www.realm667.com/en/repository- ... -142-40777. I open it in Slade3 and copy the SNDINFO plus the two sound files into my WAD file (both are OGG format and play in Slade3).

In my map I have script that includes

Code: Select all

PlaySound(0, "brain/pain")
which plays just fine. The SNDINFO is as per downloaded file:

Code: Select all

random thunder/hit { thunder/hit1 thunder/hit2 }
thunder/hit1 THNDS01
thunder/hit2 THNDS02
My expectation is if I change my PlaySound to

Code: Select all

PlaySound(0, "thunder/hit1")
then it plays that sound. It doesn't :-( The rest of the script continues, just no sound. I've tried placing the SNDINFO, THNDS02 and THNDS01 items before MAP01 and then after the map's ENDMAP instead but no joy. I noticed in the wiki that the format might include an "=" sign e.g.

Code: Select all

thunder/hit1 =THNDS01
but that errors saying you cant mix types - presumably because DOOM2.wad or gzdoom.pk3 already has one, but at least it means its definitively reading the SNDINFO.

So, how do I get this working ?

TTFN,
Jon
User avatar
Enjay
 
 
Posts: 26535
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Struggling To Add Sounds

Post by Enjay »

Does it work at the console by typing

Code: Select all

playsound thunder/hit1
:?:

If not, if you post a cut-down version of what you have done, only including the relevant lumps in the example, it might help people diagnose the problem.
DukeNukem
Posts: 5
Joined: Sun Apr 07, 2024 6:57 am
Preferred Pronouns: No Preference

Re: Struggling To Add Sounds

Post by DukeNukem »

Thanks Enjay,

Didn't realise you could do that ! Very useful for testing.

Since first post I did what I should have done first - new map, one box, a switch then add the lumps ... and that worked first time. I repeated that in original map using a switch to run my effect (previously triggered by an enemy) and that worked, so I returned to the triggered-by-enemy ... and that is working. Obviously I must have changed something just cant think what.

TTFN,
Jon

Return to “Assets (and other stuff)”