R_smos
(R_smos)
February 27, 2024, 7:00pm
1
Good day, all of you!
I have a problem with the conversion of the text input by the player to a main menu at the start, then a new level is loaded with the text inputted by the player as a variable. When I run the program, it gives an error with Accessed None.
See the blueprints.
This is the logic from the GameMode BP
This is the code for the Main_Menu_Widget
Also the nodes from the Confirm_Button
Can somebody help me in figuring out what I’m doing wrong?
Thank you so much in advance.
Arodi007
(Pixiebell Games 💼)
February 28, 2024, 8:38am
2
GameMode doesnt persist when you switch level map.
so if you are accessing your menu widget in the begin play of your game mode(that you just open level map) it won’t exist yet.
You will need game instance where you can set/get your variable and it will persist through any level map across this game session.
1 Like
R_smos
(R_smos)
February 28, 2024, 7:36pm
3
Thank you for your reply!
I tried with an instance but still don’t get anything, even an error
I changed the a little the GameMode
Got rid of the level change and made a Game_Instance with a variable
Also changed in the widget
Still, the variable doesn’t seem to transfer.
What I’m doing incorrectly?
R_smos
(R_smos)
February 28, 2024, 8:02pm
4
It worked, my friend. Thank you so much for your tip! Wish you all the best!
For the future strugglers
These are final nodes
From the widget
From the GameInstance
From ConfirmButton
From the GameMode
Hope it helps.
1 Like
system
(system)
Closed
March 29, 2024, 8:03pm
5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.