#✅ | menu music

1 messages · Page 1 of 1 (latest)

tawny slateBOT
#

Yep! You can do that with an Audio element + listeners/actions.

  1. Play the custom music: Add an Audio element to a universal layout (so it can run on every screen you care about) and configure it with your track(s) like described on the Menu Background Music page. Use a Music Controller element there too if you want to mute the vanilla menu/world music.

  2. Trigger the music randomly: Create an “On Screen Opened” listener (see the Listeners doc). In its action script, use the {"placeholder":"random_number","values":{"min":"1","max":"100"}} placeholder inside an IF block (you can nest it in a Calculator if needed) to check whether the random roll hits your desired chance. When it does, run a Set Volume / audio_toggle_play action (see the Action Scripts list) to start the Audio element.

  3. Stop the music when closing: Add an “On Screen Closed” listener, and run audio_toggle_play (or set the element’s volume to 0) for the same Audio element so it pauses/stops as soon as the menu closes.

That setup gives you a chance to play the special track each time a screen opens, while ensuring it’s muted again when the menu is left. 😊

tawny slateBOT
#

✅ | menu music