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

    Non-freezing Loop + allows delay

    Scheduled Pinned Locked Moved
    Comments & Feedback
    3
    7
    950
    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.
    • KamdroidK
      Kamdroid
      last edited by Kamdroid

      Is there any consideration of making a Loop behaviour that does not freeze until done, and allows you to have delays?

      This causes me to still often use timers instead of loops, which means extra behaviours and counting logic.

      Aidan_FireA 1 Reply Last reply Reply Quote 0
      • HamedH
        Hamed Admin
        last edited by

        You don't need to use Timers or loops. You can use Behaviour On / Off for this effect.

        0_1536780780982_Simulator Screen Shot - iPad 2 - 2018-09-12 at 15.32.49.png

        Aidan_FireA KamdroidK 2 Replies Last reply Reply Quote 0
        • Aidan_FireA
          Aidan_Fire @Hamed
          last edited by Aidan_Fire

          @hamed that's an interesting idea, except I just tried it and it causes hyperPad to freeze then crash lol.
          EDIT: Interesting, crashes when I make it do instantaneous things (like Move By, Add To Score), but does not crash with Text Bubble. I guess because Text Bubble does not let itself get activated again before the previous has finished.
          EDIT2: Just remembered you can set Text Bubble duration to 0. When you do, and then run Hamed's setup, hyperPad will freeze and crash.

          1 Reply Last reply Reply Quote 0
          • Aidan_FireA
            Aidan_Fire @Kamdroid
            last edited by Aidan_Fire

            @kamdroid Your best option for running a super fast timer without freezing hyperPad might be to run a Loop under a Timer (you will still need your own counting logic) like this:
            0_1536795196422_DC1CED6F-3A19-4207-9618-E1A58F98F8BF.png
            So the higher you set the 'Number of times', the faster the timer will activate but also the laggier your game will become, so I would keep trying different values until it is as fast as I want it to be without causing much lag or FPS drop.
            Repeats per second = 'Number of times' × 60 (in this case with a 0s timer).

            1 Reply Last reply Reply Quote 0
            • KamdroidK
              Kamdroid @Hamed
              last edited by

              @hamed Ah yes, but it would be nice to have the counting/loop logic in the behaviour itself rather than adding if statements, add, etc. as the Loop behaviour does.

              1 Reply Last reply Reply Quote 0
              • HamedH
                Hamed Admin
                last edited by

                Stack over flows are not something we will fix. In the case you want to prevent a crash like @Aidan-Oxley is describing, you need to use some kind of delay like a wait behaviour. or use a timer.

                KamdroidK 1 Reply Last reply Reply Quote 0
                • KamdroidK
                  Kamdroid @Hamed
                  last edited by Kamdroid

                  @hamed Hi, sorry for not being clear.

                  I just think it would be nice to have a seperate version (or toggle) of the Loop behaviour so it allows for delay/wait behaviours.

                  So I don't have to recreate how Loop behaviour works whenever I want to have a delay in my Loop.

                  It's pretty much like me having to recreate the functionality of a for loop every time I need to use a delay. I just feel it is unnecessary.

                  Alternatively, it would be cool to create custom behaviours (and add your own menu items when viewing the behaviour) so I can just make it myself if this is an issue.

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