hyperPad hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    How to make checkpoints?

    Scheduled Pinned Locked Moved Help and Support
    5 Posts 2 Posters 62 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • FranjipangF Offline
      Franjipang
      last edited by

      Hello hello! I’ve been struggling to make a checkpoints in my games. I can show what I’ve got so far but no dice unfortunately on actually making it work. I’m using attributes and save/load blocks to get it to work.

      IMG_0275.jpeg This is my set up at the moment.

      IMG_0277.png
      This is the code I have in the checkpoint

      IMG_0278.png
      This is the code I have in the world behaviours

      I’m not sure super sure what I’m doing wrong. Here’s a link to the project (hopefully it works okay!) please take a look and see what I’m doing wrong :’)

      FranjipangF RobinsonXR 2 Replies Last reply Reply Quote 0
      • FranjipangF Offline
        Franjipang @Franjipang
        last edited by

        The link to the project is here! https://bit.ly/4r9tOKC

        1 Reply Last reply Reply Quote 0
        • RobinsonXR Offline
          RobinsonX @Franjipang
          last edited by

          @Franjipang You have all the right behaviors. You just want to make sure they are being triggered in the right order. First, you'd want to load all the values before you try using them.

          IMG_7603.png IMG_7604.png IMG_7605.png

          I used a Behavior Bundle to ensure that behaviors are triggered in the right order (left to right). To simplify your logic, I made the player's position the default value for the Load from Save File behaviors. So on a fresh save file, it will just move the player to its original position. When these values are saved, it will use those saved values.

          RobinsonXR 1 Reply Last reply Reply Quote 0
          • RobinsonXR Offline
            RobinsonX @RobinsonX
            last edited by

            I noticed you have a "checkpoint" save key in your project. You don't need it if you're only saving player position. But if you want to find out what checkpoint the player is at, then it does make sense to have a "checkpoint" save key. Just make sure you use the Load from File behavior to retrieve the checkpoint, since it will be up to date.

            FranjipangF 1 Reply Last reply Reply Quote 0
            • FranjipangF Offline
              Franjipang @RobinsonX
              last edited by

              @RobinsonX I do plan to do different checkpoints yes! This is really helpful though. Thank you so much for your help :) how would you clear out the save when you start a new game? I’m using the modify save file>delete all keys but it’s not clearing the keys just yet.

              IMG_0281.png

              1 Reply Last reply Reply Quote 0
              • First post
                Last post