Forum rules - please read before posting.

Music - Changing volume when pause screen active

edited April 2022 in Technical Q&A

Hello,

I've got music continuing to play while in the pause screen, and what I want to do is reduce the relative volume (for example knocking off 50% of whatever the volume option is set to) when it's active, and then bring it back up to normal volume when resuming.

The Sound: Change Volume action requires a sound object, so not sure how that can be used for music.

I am setup to use a mixer for the different audio types, I guess I could just adjust that?

Comments

  • edited April 2022

    I've just discovered audio mixer snapshots, and they're amazing. I think I can use them to do this.

  • edited April 2022

    Hmmm. Not sure if what I'm doing might be the signs of a bug, or perhaps just fighting against the pause state.

    What I thought I'd do was run an action list attached to the pause menu turning on, and do a Sound: Set Mixer Snapshot to modify the music mixer. This snapshot and action works fine if I connect it to OnStart and I get the results I'd expect.

    When attaching it to the pause menu "turn on" actionlist however, the action runs, but the mixer change doesn't happen until the game is unpaused. Almost like the pause menu and pause state is kicking in and preventing any changes.

    I also tried setting 'wait until finish' to true on Sound: Set Mixer Snapshot in case that might have done anything, to no avail.

  • edited April 2022

    Sorted it.

    It's to do with the transition time in Sound: Set Mixer Snapshot.

    In the above scenario, anything more than 0.0 on the transition time won't kick in, however setting it to 0 (instant) has at least got it working.

  • In the above scenario, anything more than 0.0 on the transition time won't kick in, however setting it to 0 (instant) has at least got it working.

    Is the game paused at the time this list runs? This may be fixable.

  • edited April 2022

    The menu has "pause game when enabled" set to true, and then the action is assigned to the 'actionlist when turn on' field. So whatever order of events that will produce.

  • Does the ActionList have "Unfreezes 'Pause' menus?" checked?

  • edited April 2022

    Yup, I've tried that setup. I've also tried it set to 'run in background' to see what would happen.

    Both results are the same, and any transition greater than 0.0 will fail to happen when the pause menu is activated.

  • I've looked into this, and it's an issue with snapshots themselves, rather than the ActionList system.

    Changing snapshots over time won't work if the game is paused. If you needed a transition, you'd have to run this Action before turning the Pause menu on.

  • Good to know.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.