How to Get Variables for Widget Blueprints in Game Mode

Hi, I’m posting a series of questions because I’m still a beginner.

I make a BP_GameMode blueprint class and that is controlling the game,
and this BP contains enumeration.

In my GameMode Blueprint, I want to load a Blueprint that holds a Widget as a component.

And I made a specific button on the widget is onClicked, the isStartBtnClicked variable becomes true.



Finally, in the Game Mode Blueprint, when the isStartBtnClicked variable is true then
I’ll switch to the next enumeration.

If anyone can help me out, I would really appreciate it.
Thanks for reading my post!

1 Like


You could instead have the enumerator inside each button → clicking a button tells the Game Mode what to do. In a more elaborate scenario:

  • a widget with just a button:

image

Use those widgets instead of regular buttons :point_up_2: . As a bonus it’s now trivial to decorate the entire menu in one go rather than chase down 54 buttons in 6 submenus and update them one by one…

  • when you add the custom buttons to the menu, you can configure them to spit out specific data:

  • which the Game Mode can then process much more easily:

Now you have all the buttons of this menu report to the same Event in the game mode. Each button with a mind of its own. Consider it once things get too convoluted to handle.

3 Likes

It’s an honor to meet a big famous you in here!

Thank you for not only giving me the solution I needed, but for making it even better!

Your solution is perfect and have helped me grow,

So I’ll keep up this work !!!

THANKS A MILLION EVERYNONE !!! :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.