Day 17

What I did today

Today I finally figured out how to make the lives not reset. I made a controller object (object with no sprite) and i set it to persistent (so it doesn't reset) and in the create event i made 

life = 3;

Then in the obj_player's Step event i put

//If out of lives
if obj_lives.life <= 0 {
    show_message("You died");
    game_restart();
}


And it worked! But there,s one problem. Whenever i enter a NEW room the lives reset.

Tomorrow I will find a way to keep it from resetting whenever I enter a new room














No comments:

Post a Comment