Lives=0

Hello.
I am using gamesalad in a 4th grade class kids, to make a simple game with them. We are almost end it, but there´s a problem:
When i made an Atribute "If game live = 0, change scene", the game pause in the same level and do not change scene.

Best regards

Best Answer

Answers

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    can you post a screenshot of your rules? from your description it sounds like it should work, maybe there is a bug elsewhere.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I teach 4th graders GameSalad, too! :)

    Have you added a DisplayText behavior to an actor on the scene to watch the value of game.live? Maybe it's not actually getting to 0, or maybe it's going negative.

  • quantumsheepquantumsheep Member Posts: 8,188
    Just to be safe, I usually use 'if game.lives is equal to or less than 0'.

    Or maybe 'if game.lives < 1'

    It depends on the game - if you get hit multiple times it may not register fast enough that you hit 0, which means the change behaviour won't 'fire'.

    Saying 'less than 1' or 'equal to or less than 0' will catch that error.

    Hope that helps!

    QS :D
  • gamesfuagamesfua Member Posts: 723
    I can confirm from experience that what @quantumsheep has said is true.
  • RuddvandolphRuddvandolph Member Posts: 19
    https://www.dropbox.com/s/x15y941du97q4o4/rules.png

    The idea of the game is to "eat" the yellow balls.
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Hi @rodolfodu7@gmail.com, I don't see anything glaringly wrong with those screen shots. I would follow the other advice above and make sure the game.live is counting down correctly by using a display text behavior and printing it's value to screen while you play test. That way you can see each time the value goes up or down and exactly when/if it ever reaches zero.
  • RuddvandolphRuddvandolph Member Posts: 19
    It´s possible to "Reset Game" and mantain the record of game (points)? It´s the only way that the game goes to the begining after lives=0
  • SolarPepperStudiosSolarPepperStudios Member Posts: 754
    Use save attribute and change attribute.
  • RuddvandolphRuddvandolph Member Posts: 19
    Use save attribute and change attribute.
    I was trying...but any thing yet...


Sign In or Register to comment.