So I have 3 main layouts, one for the gameplay (1) and the other two for the endings (2 and 3). In layout 2 and 3 each have a restart button that basically do this:
Mouse clicked on Restart button -> go to layout 1
And in layout 1 I have:
On start of layout -> restart
On start of layout -> reset global variables
What this does is make the screen goes black and basically crashes.
I added two lines above this because for some reason if you play the game once and you restart, layout 1 cannot be interacted with anymore so I thought I would reset it but it does not work.
Can anyone please help?
Here's the file: