Don't know how to create a lives/time gamemodes

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By andrymas

Can someone explain to me how to create a gamemode with playes-choosen variables?
The idea is this: when lives reach 0 because you touch obstacles you go back to the main menu.

:bust_in_silhouette: Reply From: Lopy

You can have your player enter a number inside a LineEdit, or use a few 1-2-3 buttons.

To change the main scene, you would generally use :
get_tree().change_scene("scene path")
But handling the transition in a custom way is certainly possible.

When using change_scene, you pass variables over inside autoloads.

A life counter that sends you back to the main menu seems a bit frustrating, maybe a checkpoint system would be better?