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. Bug Reports
  3. Else if is broken

Else if is broken

Scheduled Pinned Locked Moved Bug Reports
56 Posts 4 Posters 23.4k Views 2 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.
  • Aidan_FireA Aidan_Fire

    @Deeeds It’s implied by the behaviours. Both conditions cannot be met at the same time, so I don’t need any else. If one of the sides of this particular Else happens, the other cannot.

    D Offline
    D Offline
    Deeeds
    wrote on last edited by
    #20

    @Aidan-Oxley Huh?

    I'm confused.

    Else, in my example, is everything else. Outside these ranges.

    You've helped me see that you and I should help the lads design a better conditional node.... behaviour.

    Aidan_FireA 3 Replies Last reply
    0
    • D Deeeds

      @Aidan-Oxley Huh?

      I'm confused.

      Else, in my example, is everything else. Outside these ranges.

      You've helped me see that you and I should help the lads design a better conditional node.... behaviour.

      Aidan_FireA Offline
      Aidan_FireA Offline
      Aidan_Fire
      wrote on last edited by
      #21

      @Deeeds The conditions you asked me to make can only be one or the other, there was no reason for me to put anything in to do “Else”. Speed cannot be between 2 and 10 but also 10 and 20 at the same time, so I don’t need to have an Else between them. Makes sense?

      1 Reply Last reply
      0
      • D Deeeds

        @Aidan-Oxley Huh?

        I'm confused.

        Else, in my example, is everything else. Outside these ranges.

        You've helped me see that you and I should help the lads design a better conditional node.... behaviour.

        Aidan_FireA Offline
        Aidan_FireA Offline
        Aidan_Fire
        wrote on last edited by Aidan_Fire
        #22

        @Deeeds Oooohhh I think I understand now, you have 2 else’s between 3 bunches of conditions. You want another condition for if all that junk isn’t true. Gimme a sec I’ll give another screenshot.

        1 Reply Last reply
        1
        • D Deeeds

          @Aidan-Oxley Huh?

          I'm confused.

          Else, in my example, is everything else. Outside these ranges.

          You've helped me see that you and I should help the lads design a better conditional node.... behaviour.

          Aidan_FireA Offline
          Aidan_FireA Offline
          Aidan_Fire
          wrote on last edited by Aidan_Fire
          #23

          @Deeeds This could’ve been done with a tonne more Ifs, but I can just disable behaviours, then enable them again once they’ve been missed. Taking advantage of how hyperPad executes behaviours.
          0_1513239623056_1A2718E9-A2E7-4FE9-906B-EEB164B49384.png

          D 1 Reply Last reply
          2
          • Aidan_FireA Aidan_Fire

            @Deeeds This could’ve been done with a tonne more Ifs, but I can just disable behaviours, then enable them again once they’ve been missed. Taking advantage of how hyperPad executes behaviours.
            0_1513239623056_1A2718E9-A2E7-4FE9-906B-EEB164B49384.png

            D Offline
            D Offline
            Deeeds
            wrote on last edited by Deeeds
            #24

            @Aidan-Oxley I'm 99% sure your Else, in this situation, will get invoked (called) before the ifs reach a conclusion that they should turn your Else behaviour off.

            Aidan_FireA 1 Reply Last reply
            0
            • D Deeeds

              @Aidan-Oxley I'm 99% sure your Else, in this situation, will get invoked (called) before the ifs reach a conclusion that they should turn your Else behaviour off.

              Aidan_FireA Offline
              Aidan_FireA Offline
              Aidan_Fire
              wrote on last edited by
              #25

              @Deeeds Already checked that. I gave speed and rotation a value, then made Else and Stuff behaviour bundles have some visual effect behaviours, and it all worked as intended.

              1 Reply Last reply
              0
              • Aidan_FireA Offline
                Aidan_FireA Offline
                Aidan_Fire
                wrote on last edited by
                #26

                I really like how neat the execute sequence of behaviours is!

                D 1 Reply Last reply
                0
                • Aidan_FireA Aidan_Fire

                  I really like how neat the execute sequence of behaviours is!

                  D Offline
                  D Offline
                  Deeeds
                  wrote on last edited by
                  #27

                  @Aidan-Oxley Where are you using execute sequence here?

                  Aidan_FireA 1 Reply Last reply
                  0
                  • D Deeeds

                    @Aidan-Oxley Where are you using execute sequence here?

                    Aidan_FireA Offline
                    Aidan_FireA Offline
                    Aidan_Fire
                    wrote on last edited by
                    #28

                    @Deeeds Sorry, I mean the order in which behaviours execute under an event, not the Execute Sequence behaviour. Like how they do each branch first, then move on left to right, but only after each whole branch is finished.

                    D 1 Reply Last reply
                    0
                    • Aidan_FireA Aidan_Fire

                      @Deeeds Sorry, I mean the order in which behaviours execute under an event, not the Execute Sequence behaviour. Like how they do each branch first, then move on left to right, but only after each whole branch is finished.

                      D Offline
                      D Offline
                      Deeeds
                      wrote on last edited by Deeeds
                      #29

                      @Aidan-Oxley That's not how it works. If you set up anything with a duration in a branch, you'll see that it jumps from left to right as fast as it possibly can, only downward movement through a branch is stalled by the durations.

                      Similarly, anything that takes a long time to create a result isn't worried about, either... I think.

                      I'm pretty sure that calls across (left to right) are blind, as fast as can be done... so far as I can tell.

                      Aidan_FireA 1 Reply Last reply
                      0
                      • D Deeeds

                        @Aidan-Oxley That's not how it works. If you set up anything with a duration in a branch, you'll see that it jumps from left to right as fast as it possibly can, only downward movement through a branch is stalled by the durations.

                        Similarly, anything that takes a long time to create a result isn't worried about, either... I think.

                        I'm pretty sure that calls across (left to right) are blind, as fast as can be done... so far as I can tell.

                        Aidan_FireA Offline
                        Aidan_FireA Offline
                        Aidan_Fire
                        wrote on last edited by Aidan_Fire
                        #30

                        @Deeeds That’s different. I’m talking about behaviours with no duration at all. As soon as they have a duration and behaviours connected underneath them, stuff changes. But still, I tested it, and it works. Idk about the more power hungry behaviours, maybe we should test that out too. But I’ve never ever had a behaviour to the right in a row activate before one to the left finishes (other than behaviours that have a duration).

                        D 1 Reply Last reply
                        0
                        • Aidan_FireA Aidan_Fire

                          @Deeeds That’s different. I’m talking about behaviours with no duration at all. As soon as they have a duration and behaviours connected underneath them, stuff changes. But still, I tested it, and it works. Idk about the more power hungry behaviours, maybe we should test that out too. But I’ve never ever had a behaviour to the right in a row activate before one to the left finishes (other than behaviours that have a duration).

                          D Offline
                          D Offline
                          Deeeds
                          wrote on last edited by
                          #31

                          @Aidan-Oxley I don't think so. I think you're just getting lucky, that the conditionals are happening fast enough (in this case) to get to the behaviour off before calling your Else behaviour. Push this hard, 100x, with others things happening, and I'm reasonably sure that you're going to get a few false elses firing...

                          @hamed any chance of this? Or do you have some kind of filtering that's making sure branches complete before moving from left to right?

                          Aidan_FireA 1 Reply Last reply
                          0
                          • D Deeeds

                            @Aidan-Oxley I don't think so. I think you're just getting lucky, that the conditionals are happening fast enough (in this case) to get to the behaviour off before calling your Else behaviour. Push this hard, 100x, with others things happening, and I'm reasonably sure that you're going to get a few false elses firing...

                            @hamed any chance of this? Or do you have some kind of filtering that's making sure branches complete before moving from left to right?

                            Aidan_FireA Offline
                            Aidan_FireA Offline
                            Aidan_Fire
                            wrote on last edited by
                            #32

                            @Deeeds Getting lucky? I’ve used hyperPad for like 5 years, made hyperPad super laggy, done all sorts of stuff, behaviours ALWAYS execute left to right.

                            D 1 Reply Last reply
                            0
                            • Aidan_FireA Aidan_Fire

                              @Deeeds Getting lucky? I’ve used hyperPad for like 5 years, made hyperPad super laggy, done all sorts of stuff, behaviours ALWAYS execute left to right.

                              D Offline
                              D Offline
                              Deeeds
                              wrote on last edited by
                              #33

                              @Aidan-Oxley I don't doubt they execute left to right, I'm doubting that they wait for their branch to finish before going further right to make the next call.

                              Are you 100% sure?

                              As to making it laggy... I can do that with ease. I think anyone can ;)

                              Aidan_FireA 1 Reply Last reply
                              0
                              • D Deeeds

                                @Aidan-Oxley I don't doubt they execute left to right, I'm doubting that they wait for their branch to finish before going further right to make the next call.

                                Are you 100% sure?

                                As to making it laggy... I can do that with ease. I think anyone can ;)

                                Aidan_FireA Offline
                                Aidan_FireA Offline
                                Aidan_Fire
                                wrote on last edited by Aidan_Fire
                                #34

                                @Deeeds Left to right, completing the whole branch before moving on to the right. Unless the branch has some sort of intentional duration. It worked in my test project, that’s enough to convince me. Could try put some loops in there and see what happens.

                                1 Reply Last reply
                                0
                                • Aidan_FireA Offline
                                  Aidan_FireA Offline
                                  Aidan_Fire
                                  wrote on last edited by
                                  #35

                                  Just tried this:
                                  0_1513257788809_61544695-5D7D-4B4D-808E-C7B5D4BE4B37.jpeg
                                  HyperPad froze for a second to do the Loop. The label turned out to be 2, so it did wait for the first (left) branch to finish before moving to the next (right).

                                  D 1 Reply Last reply
                                  0
                                  • Aidan_FireA Aidan_Fire

                                    Just tried this:
                                    0_1513257788809_61544695-5D7D-4B4D-808E-C7B5D4BE4B37.jpeg
                                    HyperPad froze for a second to do the Loop. The label turned out to be 2, so it did wait for the first (left) branch to finish before moving to the next (right).

                                    D Offline
                                    D Offline
                                    Deeeds
                                    wrote on last edited by
                                    #36

                                    @Aidan-Oxley

                                    You're officially qualified as a programmer.

                                    Finding the cheapest, quickest, easiest, narrowest way to prove a hypothesis; that's exactly what programmers do. Every.single.time...

                                    Drop the loop into a node one lower. Call a (for example) behaviour bundle first, that then calls the loop.

                                    If that works as you expected, then drop the behaviour bundle's calling into a conditional (if) that chooses to call the bundle based on external criteria.

                                    If that's still performing as you expect, then nest that inside something else, that does something else.

                                    Keep going until your find something that breaks your expected result and hypothesis.

                                    Then make a new hypothesis, and begin thoroughly testing that. And consider yourself to have graduated from programmer to coder.

                                    1 Reply Last reply
                                    0
                                    • iTap DevelopmentI Offline
                                      iTap DevelopmentI Offline
                                      iTap Development
                                      wrote on last edited by
                                      #37

                                      @Deeeds I agree that elseif is super useful....but @Aidan-Oxley is right, if you really have to, you can get by without them in many situations.
                                      Not ideal, but works.

                                      1 Reply Last reply
                                      0
                                      • iTap DevelopmentI Offline
                                        iTap DevelopmentI Offline
                                        iTap Development
                                        wrote on last edited by
                                        #38

                                        @Deeeds I’ve had else’s stop working too....I think it happened when I duplicated and rearranged ifs and elseifs a lot of times.
                                        But I’m looking froward to their updated else’s!

                                        1 Reply Last reply
                                        0
                                        • HamedH Offline
                                          HamedH Offline
                                          Hamed
                                          Admin
                                          wrote on last edited by Hamed
                                          #39

                                          Behaviours are depth first. ie, it will finish the chain (unless it hits a duration behaviour) then go on to its sibling to the right. @Deeeds can you please stop arguing for the sake of arguing? Thanks.

                                          D 2 Replies 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