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. Need Help with some coin logic

Need Help with some coin logic

Scheduled Pinned Locked Moved Help and Support
15 Posts 2 Posters 2.4k 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

    @RobinsonX for my game the player actually enters a secret room which is a different scene. When he returns back to the previous scene is where I want the collected coins to not be there anymore.

    RobinsonXR Offline
    RobinsonXR Offline
    RobinsonX
    wrote on last edited by RobinsonX
    #5

    @SplitMindGaming So when reentering back into the scene, load the array with the destroyed coin positions and find all the coin objects with the matching positions to destroy. 😄

    There are many ways you can get the coin object, but I'll suggest the easiest way:

    • Loop through all coins and add a tag to it.
    • This tag will be the initial position of the coin. Can be represented as so: x,y
    • Load the file with the destroyed coin positions - it should be an array.
    • Loop through the array and for each value, use Get Object by Tag to get the coin object with the corresponding position to destroy.
    SplitMindGamingS 3 Replies Last reply
    0
    • RobinsonXR RobinsonX

      @SplitMindGaming So when reentering back into the scene, load the array with the destroyed coin positions and find all the coin objects with the matching positions to destroy. 😄

      There are many ways you can get the coin object, but I'll suggest the easiest way:

      • Loop through all coins and add a tag to it.
      • This tag will be the initial position of the coin. Can be represented as so: x,y
      • Load the file with the destroyed coin positions - it should be an array.
      • Loop through the array and for each value, use Get Object by Tag to get the coin object with the corresponding position to destroy.
      SplitMindGamingS Offline
      SplitMindGamingS Offline
      SplitMindGaming
      wrote on last edited by
      #6

      @RobinsonX thank you so much for this. I will try it out.

      1 Reply Last reply
      1
      • RobinsonXR RobinsonX

        @SplitMindGaming So when reentering back into the scene, load the array with the destroyed coin positions and find all the coin objects with the matching positions to destroy. 😄

        There are many ways you can get the coin object, but I'll suggest the easiest way:

        • Loop through all coins and add a tag to it.
        • This tag will be the initial position of the coin. Can be represented as so: x,y
        • Load the file with the destroyed coin positions - it should be an array.
        • Loop through the array and for each value, use Get Object by Tag to get the coin object with the corresponding position to destroy.
        SplitMindGamingS Offline
        SplitMindGamingS Offline
        SplitMindGaming
        wrote on last edited by
        #7

        @RobinsonX Hi so I was trying to attempt this But tbh I am in no way shape or form a developer. Im not even sure what behavior systems I am suppose to be utilizing. Is it possible to screenshot the behavior systems needed to make this work or even create a mini project of this working. Thanks

        1 Reply Last reply
        0
        • RobinsonXR RobinsonX

          @SplitMindGaming So when reentering back into the scene, load the array with the destroyed coin positions and find all the coin objects with the matching positions to destroy. 😄

          There are many ways you can get the coin object, but I'll suggest the easiest way:

          • Loop through all coins and add a tag to it.
          • This tag will be the initial position of the coin. Can be represented as so: x,y
          • Load the file with the destroyed coin positions - it should be an array.
          • Loop through the array and for each value, use Get Object by Tag to get the coin object with the corresponding position to destroy.
          SplitMindGamingS Offline
          SplitMindGamingS Offline
          SplitMindGaming
          wrote on last edited by
          #8

          @RobinsonX I would imagine if a mini project were to be made. A character collecting some coins but intentionally missing some. There could also be a button that reloads the scene and it will pick off where it left off minus the collected coins.

          RobinsonXR 2 Replies Last reply
          0
          • SplitMindGamingS SplitMindGaming

            @RobinsonX I would imagine if a mini project were to be made. A character collecting some coins but intentionally missing some. There could also be a button that reloads the scene and it will pick off where it left off minus the collected coins.

            RobinsonXR Offline
            RobinsonXR Offline
            RobinsonX
            wrote on last edited by
            #9

            @SplitMindGaming I can make a sample project. Hang on!

            1 Reply Last reply
            0
            • SplitMindGamingS SplitMindGaming

              @RobinsonX I would imagine if a mini project were to be made. A character collecting some coins but intentionally missing some. There could also be a button that reloads the scene and it will pick off where it left off minus the collected coins.

              RobinsonXR Offline
              RobinsonXR Offline
              RobinsonX
              wrote on last edited by
              #10

              @SplitMindGaming Here's the project: https://bit.ly/3joSEVK

              Open it in safari if it does not work here. :)

              • You can collect coins and restarting the scene will leave those coins destroyed
              • You can intentionally leave coins behind and those coins will still remain after reloading the scene
              • There is a way to reset the destroyed coins save to revert all the coins to normal
              SplitMindGamingS 2 Replies Last reply
              0
              • RobinsonXR RobinsonX

                @SplitMindGaming Here's the project: https://bit.ly/3joSEVK

                Open it in safari if it does not work here. :)

                • You can collect coins and restarting the scene will leave those coins destroyed
                • You can intentionally leave coins behind and those coins will still remain after reloading the scene
                • There is a way to reset the destroyed coins save to revert all the coins to normal
                SplitMindGamingS Offline
                SplitMindGamingS Offline
                SplitMindGaming
                wrote on last edited by
                #11

                @RobinsonX wow thank you so much for this. Im putting you on the ending credits :)

                1 Reply Last reply
                1
                • RobinsonXR RobinsonX

                  @SplitMindGaming Here's the project: https://bit.ly/3joSEVK

                  Open it in safari if it does not work here. :)

                  • You can collect coins and restarting the scene will leave those coins destroyed
                  • You can intentionally leave coins behind and those coins will still remain after reloading the scene
                  • There is a way to reset the destroyed coins save to revert all the coins to normal
                  SplitMindGamingS Offline
                  SplitMindGamingS Offline
                  SplitMindGaming
                  wrote on last edited by
                  #12

                  @RobinsonX also what would you suggest I study or learn to better understand how to use behaviors like that. Because looking at the file I would have never guessed to use any of those behaviors.

                  RobinsonXR 1 Reply Last reply
                  1
                  • RobinsonXR Offline
                    RobinsonXR Offline
                    RobinsonX
                    wrote on last edited by RobinsonX
                    #13

                    @SplitMindGaming Sorry for late response - I actually learned through trial and error!

                    I trained myself to study a behavior I want to learn and observe its properties. I know I sound like a nerd, but hyperPad encourages you to be a scientist and over time, you start to learn many processes that you wouldn't expect to grasp on. It ushers you into thinking critically and puts you in a perspective of a programmer.

                    I look at a behavior and its reference, form a hypothesis and then test. After a while, I will know exactly what a behavior does and can use it to my advantage.

                    1 Reply Last reply
                    0
                    • SplitMindGamingS SplitMindGaming

                      @RobinsonX also what would you suggest I study or learn to better understand how to use behaviors like that. Because looking at the file I would have never guessed to use any of those behaviors.

                      RobinsonXR Offline
                      RobinsonXR Offline
                      RobinsonX
                      wrote on last edited by
                      #14

                      @SplitMindGaming I know some people want guidance on how to learn hyperPad, so I would suggest looking at examples and documentation (yes, video tutorials help too!). But you will need to learn exactly how the behavior system works.

                      I'll summarize the behavior system:

                      • Behaviors are executed from left to right (there are 2 exceptions)
                      • There are 2 types of behaviors: Event and Action
                      • Event behaviors tell the behaviors when to execute
                      • Action behaviors tell the behaviors what to execute and what to do
                      • If an Action behavior is not connected from the top, it will execute immediately when the scene runs
                      SplitMindGamingS 1 Reply Last reply
                      0
                      • RobinsonXR RobinsonX

                        @SplitMindGaming I know some people want guidance on how to learn hyperPad, so I would suggest looking at examples and documentation (yes, video tutorials help too!). But you will need to learn exactly how the behavior system works.

                        I'll summarize the behavior system:

                        • Behaviors are executed from left to right (there are 2 exceptions)
                        • There are 2 types of behaviors: Event and Action
                        • Event behaviors tell the behaviors when to execute
                        • Action behaviors tell the behaviors what to execute and what to do
                        • If an Action behavior is not connected from the top, it will execute immediately when the scene runs
                        SplitMindGamingS Offline
                        SplitMindGamingS Offline
                        SplitMindGaming
                        wrote on last edited by
                        #15

                        @RobinsonX Thanks for this. Honestly if it wasnt for your videos also I would be lost in alot of things. You do a good job of explaining things clearly yet also adding humor to your videos. Great work

                        1 Reply Last reply
                        1

                        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