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

    Moving an object by a random number

    Scheduled Pinned Locked Moved Help and Support
    6 Posts 2 Posters 1.0k 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.
    • ToastedghostT Offline
      Toastedghost
      last edited by

      Hi, I know this is possible but am unsure how to excute this action.
      I wish to move a non player object left by a random number and continue doing so until it colides with a specific object. It will probably need pause inbetween the random number generated as the image will travel too fast.
      Thanks in advance.

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

        Use the Random Number behavior to generate random numbers.
        Use the Move By behavior to move an object from its current position.

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

          @RobinsonX Thanks for a super fast reply. Where is the move by behaviour located, cant find it under object menu. Cheers

          ToastedghostT 1 Reply Last reply Reply Quote 1
          • ToastedghostT Offline
            Toastedghost @Toastedghost
            last edited by

            @Toastedghost Found it in transform. So do I use 0 - 50 in random. Then move by x -50. Though my object always moves the same distance an only once. I must be missing something.

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

              @Toastedghost You're welcome! :)

              When selecting behaviors, there are green circles that pop up. These are behavior outputs.

              It can be a number from a math operation, text from a label, or anything. The random number behavior outputs a number, and to use it, you drag its green output icon to whatever input field you wish to populate it with.

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

                Also, hyperPad has a Discord server if you want really quick replies from other people. We don't get notified on here outside the app, so Discord is a great way to communicate with others. :)

                https://discord.gg/RpXHJXq
                You can chat with us there!

                1 Reply Last reply Reply Quote 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
                • First post
                  Last post