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

    Moving an object by a random number

    Scheduled Pinned Locked Moved
    Help and Support
    2
    6
    251
    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
      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
        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
          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
            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
              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
                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
                • First post
                  Last post