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

    loop not working

    Scheduled Pinned Locked Moved
    Help and Support
    3
    5
    243
    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.
    • LupoL
      Lupo
      last edited by

      When adding a simple loop with number of times to execute put to 5 and then adding an alert popup which should be shown 5 times.
      But the alert is actually only shown once (with index 4).
      What am I doing wrong?

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

        @Lupo The alert popup is actually executed 5 times - the problem is that you can only see one popup at once, so you're really seeing the last one.

        You can see that the alert behavior has a little lightning icon - that means that it triggers after an event. You can make it so the after the alert is closed, another one can pop up.

        LupoL 1 Reply Last reply Reply Quote 0
        • LupoL
          Lupo @RobinsonX
          last edited by

          @RobinsonX Actuall the popup was only test. Same effect I have when replacing the popup with a Wait 1s and then playing a sound. I only hear the sound once after 1 second. I expected to hear the sound 5 times with 1 second intervall…

          KamdroidK RobinsonXR 2 Replies Last reply Reply Quote 0
          • KamdroidK
            Kamdroid @Lupo
            last edited by

            @Lupo Last time I checked, it seems that Loop basically ignores any wait/time-based/event behaviours.

            I do hope they will add support for this in the future.

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

              @Lupo The loop triggers events instantaneously, so it doesn't wait until the behaviors under it are done executing like Kamdroid said.

              The wait behavior would execute once because every time it's executed, it interrupts its previous instance - it's like resetting a clock every time it executes.

              The way you would achieve something like this is to connect the behaviors from the bottom to the top so it makes a loop. When you want to stop the loop, use the Behavior Off behavior to interrupt the chain of events.

              1 Reply Last reply Reply Quote 1
              • First post
                Last post