1. Hey! Guest! The 36th GMC Jam will take place between February 27th, 12:00 UTC - March 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

"Game over" not working when losing all lives

Discussion in 'Programming' started by SnowsB, Jul 1, 2019.

  1. SnowsB

    SnowsB Member

    Joined:
    Jul 1, 2019
    Posts:
    1
    I'm new at programming, so I'm really dumb at it, sorry!
    But the thing is, i'm making my first game, and I cant add the "game over" when the players lose all the three lives. It automatically ends when losing the first live. This started happening when I put "if lives", so probably i'm missing something there. What should I do? Please, no coding haha
    lives.PNG
     
  2. Rob

    Rob Member

    Joined:
    Jul 12, 2016
    Posts:
    768
    I didn't read your problem correctly, sorry - I thought it would be an issue due to the "empty" message next to the value of "If Lives"
     
    Last edited: Jul 1, 2019
  3. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    4,872
    You put the Exit Game action into the else branch of If Lives, so now it is "if lives is not 0 then exit game". Change it to the other one.
     
    N0ba likes this.
  4. N0ba

    N0ba Member

    Joined:
    Jun 3, 2019
    Posts:
    14
    I haven't used DND since when I first started with GameMaker, but can that "If Lives" block be set to "Equals or less than"? Try that. It may be going lower than 0 before it can be read.
     

Share This Page