Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
hyperPad

hyperPad Forum

  1. Home
  2. Help and Support
  3. Can you save the progress of a health bar

Can you save the progress of a health bar

Scheduled Pinned Locked Moved Help and Support
11 Posts 2 Posters 1.2k Views 1 Watching
  • 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.
  • SplitMindGamingS SplitMindGaming

    I would think saving the health bar is very similar to how everything is is saved and loaded. With labels its get label, save to file. Then load from file, set label. I tried the same method with trying to save a health bar and everytime the scene restarts it will never show the correct value. In fact it shows it as empty everytime. Check the screenshot. What step am i missing. 2A231905-2C4C-4D27-A6C4-BB5275C48596.png .44E3DD41-C436-4741-A01E-8579C66E21BF.png 688A4F65-2410-4535-8425-210550EA4C19.png

    Aidan_FireA Offline
    Aidan_FireA Offline
    Aidan_Fire
    wrote on last edited by Aidan_Fire
    #2

    @SplitMindGaming In your second screenshot there I can see you are saving the health bar object ID instead of the health. I think this could be what's wrong, but why is it different in the other 2 screenshots?

    1 Reply Last reply
    0
    • SplitMindGamingS SplitMindGaming

      I would think saving the health bar is very similar to how everything is is saved and loaded. With labels its get label, save to file. Then load from file, set label. I tried the same method with trying to save a health bar and everytime the scene restarts it will never show the correct value. In fact it shows it as empty everytime. Check the screenshot. What step am i missing. 2A231905-2C4C-4D27-A6C4-BB5275C48596.png .44E3DD41-C436-4741-A01E-8579C66E21BF.png 688A4F65-2410-4535-8425-210550EA4C19.png

      Aidan_FireA Offline
      Aidan_FireA Offline
      Aidan_Fire
      wrote on last edited by Aidan_Fire
      #3

      @SplitMindGaming In the load from file behaviour, can you try setting the default value to maybe 50, and tell me what happens?

      SplitMindGamingS 1 Reply Last reply
      0
      • Aidan_FireA Aidan_Fire

        @SplitMindGaming In the load from file behaviour, can you try setting the default value to maybe 50, and tell me what happens?

        SplitMindGamingS Offline
        SplitMindGamingS Offline
        SplitMindGaming
        wrote on last edited by
        #4

        @Aidan-Oxley yes that screenshot shows the object id because i was also testing that out as well. It also doesnt save when i drag in the object progress. When i set the default value to 50 it doesnt save its progress as well it just looks like it deals more damage. I will create a simple version to share. I cant even do this with life indicator.

        SplitMindGamingS 1 Reply Last reply
        0
        • SplitMindGamingS SplitMindGaming

          @Aidan-Oxley yes that screenshot shows the object id because i was also testing that out as well. It also doesnt save when i drag in the object progress. When i set the default value to 50 it doesnt save its progress as well it just looks like it deals more damage. I will create a simple version to share. I cant even do this with life indicator.

          SplitMindGamingS Offline
          SplitMindGamingS Offline
          SplitMindGaming
          wrote on last edited by
          #5

          @SplitMindGaming heres a test file. I place the default value of the health bar to 50 under the load from file. Because if i leave it at default 0. It will spawn with nothing.Test.tap

          1 Reply Last reply
          0
          • SplitMindGamingS Offline
            SplitMindGamingS Offline
            SplitMindGaming
            wrote on last edited by
            #6

            To replicate the problem simply drag the player to the enemy to deal some damage. Then click the restart scene on top to see if it saves your progress.

            Aidan_FireA 2 Replies Last reply
            0
            • SplitMindGamingS SplitMindGaming

              To replicate the problem simply drag the player to the enemy to deal some damage. Then click the restart scene on top to see if it saves your progress.

              Aidan_FireA Offline
              Aidan_FireA Offline
              Aidan_Fire
              wrote on last edited by
              #7

              @SplitMindGaming So, every time you load the health bar, it appears as 50% now right? When you change default to 50.

              1 Reply Last reply
              0
              • SplitMindGamingS SplitMindGaming

                To replicate the problem simply drag the player to the enemy to deal some damage. Then click the restart scene on top to see if it saves your progress.

                Aidan_FireA Offline
                Aidan_FireA Offline
                Aidan_Fire
                wrote on last edited by
                #8

                @SplitMindGaming Anyway, here's the problem I should've realised this earlier lol:
                CF4ECCDE-100D-4251-B105-03FB19872302.jpeg
                Event on empty means it will only trigger behaviours underneath it once the health bar is empty, so all you needed to do in this case was put the behaviours side by side (left to right) like this:
                1C793A99-31A6-412A-B352-E9CC23E137B2.png
                Turns out you don't even need the Get Health Bar behaviour here since Add to Health Bar seems to be capable of outputting the current health after changing the health bar. Also, since the health bar is instantly loaded every time, now I would recommend setting the default value of load from file to 100 (default value means if there is nothing saved yet, I.e it's your first time ever fighting the enemy with this health bar, it will by default set the health bar to 100%).

                SplitMindGamingS 1 Reply Last reply
                1
                • Aidan_FireA Aidan_Fire

                  @SplitMindGaming Anyway, here's the problem I should've realised this earlier lol:
                  CF4ECCDE-100D-4251-B105-03FB19872302.jpeg
                  Event on empty means it will only trigger behaviours underneath it once the health bar is empty, so all you needed to do in this case was put the behaviours side by side (left to right) like this:
                  1C793A99-31A6-412A-B352-E9CC23E137B2.png
                  Turns out you don't even need the Get Health Bar behaviour here since Add to Health Bar seems to be capable of outputting the current health after changing the health bar. Also, since the health bar is instantly loaded every time, now I would recommend setting the default value of load from file to 100 (default value means if there is nothing saved yet, I.e it's your first time ever fighting the enemy with this health bar, it will by default set the health bar to 100%).

                  SplitMindGamingS Offline
                  SplitMindGamingS Offline
                  SplitMindGaming
                  wrote on last edited by
                  #9

                  @Aidan-Oxley wow thanks for that. Do u know if theres a way to manipulate the healthbar images. When i go to choose my own the alignment of the 2 seems off. I also would want an animated healthbar as well. Would you happen to know if hyperpad can load those in?

                  Aidan_FireA 2 Replies Last reply
                  0
                  • SplitMindGamingS SplitMindGaming

                    @Aidan-Oxley wow thanks for that. Do u know if theres a way to manipulate the healthbar images. When i go to choose my own the alignment of the 2 seems off. I also would want an animated healthbar as well. Would you happen to know if hyperpad can load those in?

                    Aidan_FireA Offline
                    Aidan_FireA Offline
                    Aidan_Fire
                    wrote on last edited by
                    #10

                    @SplitMindGaming If you want the alignment to be correct, make sure that both the images for the frame and the bar are the exact same resolution, and the frame and bars are in the middle of the image you made.

                    1 Reply Last reply
                    0
                    • SplitMindGamingS SplitMindGaming

                      @Aidan-Oxley wow thanks for that. Do u know if theres a way to manipulate the healthbar images. When i go to choose my own the alignment of the 2 seems off. I also would want an animated healthbar as well. Would you happen to know if hyperpad can load those in?

                      Aidan_FireA Offline
                      Aidan_FireA Offline
                      Aidan_Fire
                      wrote on last edited by
                      #11

                      @SplitMindGaming I think you can animate the frame, but not the bar itself. If you wanted to have more custom health bars you would have to program one yourself using other objects.

                      1 Reply Last reply
                      0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Search