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!

Need help!

Scheduled Pinned Locked Moved Help and Support
4 Posts 2 Posters 854 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.
  • aPaperWeightA Offline
    aPaperWeightA Offline
    aPaperWeight
    wrote on last edited by
    #1

    Hey guys! I’m making a subway surfers like game I guess, how would I make random generated objects? If anyone can give me a tip on this it will be much appreciated! Thanks!

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

      Hello! You can generate random outputs and associate those outputs with an event in the game.

      For example, there could be a 10% chance every time that a coin can spawn.

      To achieve the example ahead, you use a Random Number behavior. For this case, you can make it generate a number between 0 and 9 inclusively (10 unique numbers). You can use an If behavior and say that if the output of the random number behavior equals 1, then spawn a coin.

      The coin spawning would happen 1 out of 10 times because there are 10 possible outcomes with only 1 having a coin spawning.

      Of course, you can go further than that and use a bunch of if behaviors and random numbers - go crazy! :)

      aPaperWeightA 1 Reply Last reply
      0
      • RobinsonXR Offline
        RobinsonXR Offline
        RobinsonX
        wrote on last edited by
        #3

        If you have a bunch of different objects you wanna spawn but only want to spawn one of them at a time, I recommend using the Execute Sequence behavior.

        This behavior only executes only one of the behavior nodes connected below. Just make sure you set the mode to Random.

        1 Reply Last reply
        0
        • RobinsonXR RobinsonX

          Hello! You can generate random outputs and associate those outputs with an event in the game.

          For example, there could be a 10% chance every time that a coin can spawn.

          To achieve the example ahead, you use a Random Number behavior. For this case, you can make it generate a number between 0 and 9 inclusively (10 unique numbers). You can use an If behavior and say that if the output of the random number behavior equals 1, then spawn a coin.

          The coin spawning would happen 1 out of 10 times because there are 10 possible outcomes with only 1 having a coin spawning.

          Of course, you can go further than that and use a bunch of if behaviors and random numbers - go crazy! :)

          aPaperWeightA Offline
          aPaperWeightA Offline
          aPaperWeight
          wrote on last edited by
          #4

          @RobinsonX Thanks! It doesn’t work that well, but it may be because i’m doing something wrong, i’ll keep trying.

          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