Break and Continue commands in a loop?

0 favourites
  • 3 posts
From the Asset Store
SynthWave Loop Pack includes 68 seamless loops, founded on 11 original melodies. For use in game and custom works.
  • Hi guys, I'm new to the forum, but I've been experiencing with Construct 2 for almost a month and I successfully ported an app which was initial made in another language.

    Construct is complex and easy to use, but one of the important things that I'm missing is the possibility to add Break and Continue commands within nested loops. How do you deal with it? did someone made a plugin or something?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • System Stop loop ( = continue)


    -define local variable

    + for loop

    + variable != 1

    • set variable 1 as soon as you want to break ;)

    (= break)

    I could make a break plugin, but I dont think this would save much time.

  • Yes, you are right, we can use System Stop loop and add local variables and put conditions in the loop. But a real Break command would break the loop and not execute the remaining code from the current iteration. The Continue command would force the loop to not continue the iteration and jump to the next one.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)