Game.Lives question help

freshintechfreshintech Member Posts: 27
edited November -1 in Working with GS (Mac)
Hello, I have a question about game.lives. I have a fruit ninja type game and Im trying to figure out how to take away a life if the player doesnt swipe the fruit in time and it falls off the screen. Anyone have any suggestions? Thanks

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    A simple way is to put walls all around your scene outside of the play area and have a rule in the fruit when it collides with those walls change attribute game.lives to game.lives-1
  • freshintechfreshintech Member Posts: 27
    haha thanks but the problem with the wall is when the actor comes up for me too swipe it, it loses a life. How do I make it so that when the actor comes up it doesnt lose a life, only when it falls.
  • freshintechfreshintech Member Posts: 27
    RKS said:
    EDIT: Sorry this won't work sorry.

    Ok thanks
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    have your rule when actor collides with the wall AND attribute self motion linear velocity y < 0

    then it will only take effect when the fruit is moving down
  • freshintechfreshintech Member Posts: 27
    JohnPapiomitis said:
    have your rule when actor collides with the wall AND attribute self motion linear velocity y < 0

    then it will only take effect when the fruit is moving down

    How do I do this? im not that good at gamesalad. can you give me specific steps? thanks
  • freshintechfreshintech Member Posts: 27
    RKS said:
    In the rule there will be a label that says: When all conditions are valid and there will be a plus button right next to that label. Push it. Then in the drop down box change when actor recieves event to attribute. Then push the little logo by the text box. choose actorname.motion.linear velocity. y. then in dropdown box choose <, and then in the next textbox type in zero. Make sure the collide condition is still there. That should work.

    Thanks! And how do I make it so after the actor loses all three lives, it makes it game over?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    make a rule when attribute game.lives is less then or equal to 0
    -change scene to game over
Sign In or Register to comment.