How do you make Player go back one level.

I want my player to go back to level 10 if it dies more than 3 times on level 11. How would i go about setting this up?

Comments

  • natzuurnatzuur Member Posts: 304
    For a basic system you'll need an attribute to track deaths and a ruleset on an actor placed on each scene.

    Level control actor:

    Change attribute deathcounter to 0

    When attribute deathcounter=3
    Change scene to level 10

    Then you just do that for every scene. Or if you're feeling up to it try making that into a dynamic system where one actor controls all levels without having to change the logic per scene.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You'll need a rule that keeps track of the player's deaths. Something like When actor collides with [enemy actors] --> change attribute game.deaths to game.deaths+1. Keep in mind that you'll need to reset that attribute at the start of each level. Then have another rule that says When attribute game.deaths>3 --> change attribute game.level to game.level-1 [or maybe Change Scene... I have NO IDEA how you've set this up because you haven't given any details.]

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.