Menu Sound - Possible in MENUDEF?

Thu Sep 30, 2021 2:58 pm

Is it possible, using MENUDEF, to have the menu make a sound while it is open?

I'm trying to create a "techy" sort of stand-alone mod and it would be nice of there was a low-key computery hum in the background while the menu was open (nothing invasive, just a background noise). The mod will not be based on Doom, so any Doom menu considerations are not particularly important.

Is it possible or would I have to start delving into ZScript menus to do it? I don't see any mention of sound or music on the MENUDEF page of the Wiki.

[edit] Well, it looks like changing the music isn't an option: viewtopic.php?f=18&t=29086 Which is fair enough (and it wouldn't have really done what I was after anyway). I wonder if a looping, quiet ambient sound of some sort played over the music is doable? Ultimately, it's not a big deal if it can't be done. [/edit]

Re: Menu Sound - Possible in MENUDEF?

Sat Oct 30, 2021 10:45 pm

You wanted BGM or BGA in your menu screen? I know you can have customised menu sounds like beeps, clicks,
Gun cocks and stuff like that in the menudefs.

If you do find an alternative to make this possible let me know. It would be perfect for my Athena Mission Pack I'm working on.

Re: Menu Sound - Possible in MENUDEF?

Mon Nov 01, 2021 3:58 am

Enjay, I think what you're looking for is something similar to this.

script 2 (void)
delay(2180); //restarts

However, it'll be scripts and you will have to create a "TITLEMAP.wad"

Hope this helps.

Re: Menu Sound - Possible in MENUDEF?

Mon Nov 01, 2021 5:00 am

The problem isn't starting the sound but stopping it - a looping sound played in menus don't have an "originator" so to speak so there's no way to get to the sound source to stop it when it's time to close the menu.

I can think of a hacky workaround that involves spawning an actor in the world to play the sound loop using the UI/no-pause flags. Even then though, there are some limitations - if you happen to end the game while the sound loop is on, the sound will continue to play indefinitely.

I'll see if I can put together a quick demo later.

At any rate, this is delving somewhat deep into ZScript territory. It can't be done without non-ZScript features.

Re: Menu Sound - Possible in MENUDEF?

Mon Nov 01, 2021 6:09 am

yeah, this is beyond me. I pulled this from the "Death 4 Told" Mod I have. It's really advanced stuff. I can't even comprehend the level
of complexity. This mod had about 5+ modders developing it. I would very much like to talk to those lads about development with my