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. Comments & Feedback
  3. Loop Break (exit out of loop before completed)

Loop Break (exit out of loop before completed)

Scheduled Pinned Locked Moved Comments & Feedback
5 Posts 3 Posters 638 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.
  • KamdroidK Offline
    KamdroidK Offline
    Kamdroid
    wrote on last edited by Kamdroid
    #1

    Add a way to finish/break out of a Loop before it fully completes, like in normal programming.

    string[] stuff = {"bottle","pie","iPad"};
    for(int i = 0; i < stuff.length; i++)
    {
        if(stuff[i] == "pie")
            break;
    }
    
    Aidan_FireA 1 Reply Last reply
    0
    • KamdroidK Kamdroid

      Add a way to finish/break out of a Loop before it fully completes, like in normal programming.

      string[] stuff = {"bottle","pie","iPad"};
      for(int i = 0; i < stuff.length; i++)
      {
          if(stuff[i] == "pie")
              break;
      }
      
      Aidan_FireA Offline
      Aidan_FireA Offline
      Aidan_Fire
      wrote on last edited by
      #2

      @Kamdroid Behaviour Off the loop. Then if you still wanna use it, Behaviour On it again the next frame (just connected directly underneath the Off). Maybe an even better idea than just Break Loop behaviour: a Restart or Stop Behaviour behaviour, stops everything the behaviour selected was doing. But if Behaviour Off and then On pretty much does this, this would only cut down 2 behaviours when stopping behaviours.

      KamdroidK T 2 Replies Last reply
      0
      • Aidan_FireA Aidan_Fire

        @Kamdroid Behaviour Off the loop. Then if you still wanna use it, Behaviour On it again the next frame (just connected directly underneath the Off). Maybe an even better idea than just Break Loop behaviour: a Restart or Stop Behaviour behaviour, stops everything the behaviour selected was doing. But if Behaviour Off and then On pretty much does this, this would only cut down 2 behaviours when stopping behaviours.

        KamdroidK Offline
        KamdroidK Offline
        Kamdroid
        wrote on last edited by
        #3

        @Aidan-Oxley Oh, you're right. I totally forgot about trying behaviour off. Thanks.

        1 Reply Last reply
        0
        • Aidan_FireA Aidan_Fire

          @Kamdroid Behaviour Off the loop. Then if you still wanna use it, Behaviour On it again the next frame (just connected directly underneath the Off). Maybe an even better idea than just Break Loop behaviour: a Restart or Stop Behaviour behaviour, stops everything the behaviour selected was doing. But if Behaviour Off and then On pretty much does this, this would only cut down 2 behaviours when stopping behaviours.

          T Offline
          T Offline
          Thecheater887
          wrote on last edited by
          #4

          @Aidan-Oxley Doesn’t behavior on execute it?

          Aidan_FireA 1 Reply Last reply
          0
          • T Thecheater887

            @Aidan-Oxley Doesn’t behavior on execute it?

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

            @Thecheater887 Not if the loop is connected underneath another behaviour, and the Begavior On has Skip Events turned off.

            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