Communication between main menu widget and gameplay level
I have a widget with my main menu in one level called menu (with the own gamemode and character controller). And in my other level I have my player with the playable level with all the gameplay.
In my menu, there is an option in "create game". That's option is a spin box.
I am searching for do that the value of the spin box set the same value in a float on the playable level. I tried with events dispatchers, but no way. I also searched a lot in Google, but nothing.
I spend two days trying to do this little thing. Please help
asked Mar 20 '17 at 03:01 PM in Blueprint Scripting
You can use RemoteEvent to call events in a sub-level. But you can't use input variables on it.
So if you bind an event to value changed on your spin box in your Menu level, and when it is changed, store the value in GameMode or GameInstance, call a remote event with the name of a custom event in your sub-level, then in the sub-level it will get the value from GameMode.
This only works with sub-levels that are loaded though. If that is not the case you will just have to store the value in GameInstance, and retrieve it when the level is loaded.
Or, just add the widget to the viewport in the sub-level inste
answered Mar 20 '17 at 03:16 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here