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. Loop and spawn

Loop and spawn

Scheduled Pinned Locked Moved Help and Support
5 Posts 2 Posters 29 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.
  • MrAeon1111M Offline
    MrAeon1111M Offline
    MrAeon1111
    wrote last edited by
    #1

    Hi,
    Can someone show me how to use the function loop?
    I have been trying the entire afternoon now with zero success.
    To make the most basic thing I mean
    Just to spawn all the elements of an array.

    Can you show me properly how to do it?

    I have an array. I want to spawn one of each element somewhere that’s it.
    Thank you

    RobinsonXR 1 Reply Last reply
    0
    • MrAeon1111M Offline
      MrAeon1111M Offline
      MrAeon1111
      wrote last edited by
      #2

      I found the solution. But only one problem remains I cannot spawn for example 4 times the same object.

      1 Reply Last reply
      0
      • MrAeon1111M MrAeon1111

        Hi,
        Can someone show me how to use the function loop?
        I have been trying the entire afternoon now with zero success.
        To make the most basic thing I mean
        Just to spawn all the elements of an array.

        Can you show me properly how to do it?

        I have an array. I want to spawn one of each element somewhere that’s it.
        Thank you

        RobinsonXR Online
        RobinsonXR Online
        RobinsonX
        wrote last edited by
        #3

        @MrAeon1111 said:

        Hi,
        Can someone show me how to use the function loop?
        I have been trying the entire afternoon now with zero success.
        To make the most basic thing I mean
        Just to spawn all the elements of an array.

        Can you show me properly how to do it?

        I have an array. I want to spawn one of each element somewhere that’s it.
        Thank you

        In the Loop behavior, you use the For Each mode, so it would do it for each element in the array. You can either use the Array Behavior or plug it in look shown in the screenshot.

        IMG_8535.jpeg

        Then inside that loop, you can spawn an object. Nothing special about it - customize it as you wish.

        IMG_8536.jpeg

        You can use the currentValue output to get the current element in the array. In this example, I just set the text of the spawned label with it.

        IMG_8537.jpeg

        When looping through the elements, it will spawn one object for each element in the array.

        1 Reply Last reply
        0
        • RobinsonXR Online
          RobinsonXR Online
          RobinsonX
          wrote last edited by
          #4

          btw the Spawn on Object behavior has a built-in Multiplier input field - it determines how many objects should spawn when the behavior is triggered once.

          1 Reply Last reply
          0
          • MrAeon1111M Offline
            MrAeon1111M Offline
            MrAeon1111
            wrote last edited by
            #5

            Perfection thanks

            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