Displaying Score in Game Over Menu

#1

I have my score updating in my main.gui during run time. When the game_over.gui is enabled and the main.gui is disabled, how do I get a hold on the score node from the main.gui and display the score node in the game_over.gui. I’ve been working on this for about 2 to 3 weeks now and still have found no solution to my problem. Maybe I’m looking at the solution in the wrong way.

Thank you for the help in advance!

0 Likes

#2

You can send a message with score from main.gui to game_over.gui. Or you can store the score value in a shader Lua module that both gui_script files can access.

0 Likes

#3

You can send the score over to the other GUI in a message. See here for details.

You could also store the score information in a Lua module shared by the two GUIs, though I’m not sure that’s the best approach.

0 Likes

#4

Thank you for the fast response. I will give it a try by sending a message.

1 Like