Hello i would like help to put 3 lives to a game

I am making a game and I need to put lives to lose them to start the game again, but I do not know how to do this configuration I wish to put 3 lives, if someone can help me I would appreciate it.

Hi, it depends on what kind of game you are making, but basically, this variables related, take a look on tutorial on the wiki about variables and how to interract with it.

wiki.compilgames.net/doku.php/gd … evariables

Basically you’ll have a global variable named “life”, with default value “3” ; each time the player is loosing, do -1 to the var. When “life” is reaching 0 => game over