Triggering events via variables

Hello, ive been trying to trigger an event via a variable, such that when the variable, which i will use as a counter for lives in my game, reaches a certain number, it will trigger the an end screen and end the game.

1 Like

image
I currently have this block which should restart the scene when my variable reaches 0, but it doesnt seem to do anything at all. (variable starts at 5, and i have a visual indicator that shows it actually does reach 0, yet nothing happens)

1 Like

Hello! it is simple: you need to put the if condition inside a forever command so it runs for all the time, because now it runs only one time when you start the scene.

1 Like