Break and Continue commands in a loop?

  • 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?

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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)