Menu widget fires music multiple times

My screenshot is in the W_Core widget

If you add it once to the viewport, it will play the music once.


Could you give us a breakdown of how the whole things is supposed behave:

  • the player opens the main and the music start playing
  • we go to options (the music keeps playing)
  • we go to settings (the music keeps playing)
  • we return to main and the same music keeps playing?

That’s what I understood so far. Do tell if I got it right!

1 Like

I feel like the issue is in the sub menu widgets, see below of options
each widget has the same setup

Yes that is correct

Why do you remove the menu? And create a new one? This whole exercise was to avoid that specifically. Or is this just a not-in-use leftover?

That’s how it was originally configured, but shouldn’t I only have the bottom part?

if you ever click this button, you’ll gave another brand new Main Menu again.

Okay I tried it with the top part disconnected, but now nothing happens when I click Options

This goes here and tells the Core widget to switch to the Main Menu again. Do have a closer look at this again. You already have all the menus living inside the switcher. We are not creating / destroying anything anymore. We just flip between existing widgets.


Event Dispatchers are really efficient and powerful. They shine in scenarios like this.

Okay I updated Options to be

On Clicked (ReturnButton) > Call Return to Main Menu

But this Dispatcher is only seen in W_Options so I can’t use it for Saved/DevDebug/Controls etc

You can. How would you like to use it? Because that’s, like, the most powerful feature that does not get talked about often enough.

I would certainly like to use it, it seems like best practice to me, but I’m stuck on what should be in each widget blueprint for Options / Controls etc is it the Top or Bottom solution?

Because that’s, like, the most powerful feature that does not get talked about often enough.

Sadly, you do not even need it here :frowning:


The onClicked calls a dispatcher which your Core widget catches and uses its switcher to give you the menu you want. The last 2 images of my original post:

b023329ae4af23c710b139574408a073eae140a0_2_690x148

15e6766f966■■■2fc202f49decdc564ba36553a0_2_690x200

Each widget now has

On Clicked (ReturnButton) > Call Return to Main Menu.

The W_Core has…

Return to Main Menu (W_Options) > Set Active Widget > Widget Switcher > W Menu

Nah. The dispatchers go in to widget sitting in the core, the core listens to them.

  • Controls

b023329ae4af23c710b139574408a073eae140a0_2_690x148

  • Core

15e6766f966■■■2fc202f49decdc564ba36553a0_2_690x200

I manually created ‘ReturnToMainMenu’ Event Dispatcher in each widget, but it doesn’t work

What does not work? More precisely?

I have it set up like those screenshots you provided, but clicking Return doesn’t do anything still

Can you show the hierarchy of this widget? What you call core:

image

CoreW

The widgets are also not using ReturnToMainMenu for their On Clicked event they are using ReturnButton, how do I add the dispatcher in this graph?