SNDINFO frustration

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom 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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
Sergeant Hoppy
Posts: 42
Joined: Mon Jun 21, 2021 11:24 am

SNDINFO frustration

Post by Sergeant Hoppy »

Well, I don't get what I'm doing wrong, but I cannot get custom sounds going.

My sndinfo:
Mouthnoise eatburgr

the name of the wav is eatburgr without the .wav at the end so it matches.

My decorate:
ACTOR Fries : Health replaces Stimpack 2011
{
Inventory.Amount 10
Inventory.PickupMessage "$GOTFRIES" // "Salty and delicious."
Health.LowMessage 25, "$GOTFRIESNEED" // "Still warm and just a little soggy!"
inventory.pickupsound "Mouthnoise eatburgr"
States
{
Spawn:
FRIS A -1
Stop
}
}


I tested playing the sound in game, it said eatburgr is not a sound, so I must have goofed hard here.
Kzer-Za
Posts: 509
Joined: Sat Aug 19, 2017 11:52 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: SNDINFO frustration

Post by Kzer-Za »

https://zdoom.org/wiki/SNDINFO
SNDINFO supports the following commands:

sound assignment (logicalname lumpname)
It means that in a SNDINFO line that looks like this:

Code: Select all

mouthnoise eatburgr
"eatburgr" is the name of the file in your SOUNDS folder, and "mouthnoise" is the name that you need to use in Decorate:

Code: Select all

 inventory.pickupsound "mouthnoise"
BTW, putting your code inside the code tag improves the readability of your post :)
User avatar
determin1st
Posts: 57
Joined: Wed Oct 06, 2021 11:23 am
Contact:

Re: SNDINFO frustration

Post by determin1st »

i like $random thing, it brings more dynamic to the sounds produced. the doc doesn't specify limit though, i bet there is some.. putting tabs/spaces for readability is also good (i prefer tabs :) )
Guest

Re: SNDINFO frustration

Post by Guest »

Oh, so that was what I did wrong! Thank you, finaly I can do sounds properly, I sat for the longest time with the wiki and fiddled around.
Post Reply

Return to “Scripting”