I'm working on a game that has the player race to a goal while dodging obstacles, and after reaching the goal successfully an amount is added to the total score based on how long it took, and the level is started over. You keep doing this until you eventually hit an obstacle and crash.
I'm having a problem though storing the score between these restarts triggered after hitting the goal.
When the layout is restarted, so are all the variables.
It might also be nice to use a variable to limit the number of restarts.
Does anyone know what needs to be done to store the variable between restarts?
It seems I was completely mistaken about the cause of the issue.
Global variables seem to be stored between restarts, but trying to set text in the same event as a restart does not work for some reason.
All I had to do was change the text set action to occur on layout start rather than just before it gets restarted.