Stop loop action

0 favourites
  • 8 posts
From the Asset Store
SynthWave Loop Pack includes 68 seamless loops, founded on 11 original melodies.
  • Hey all

    I have a doubt on the stop loop action. When called does it stop every loop that's running regardless of where it is. Say i had the stop loop as a sub event of a running loop. When called will it stop every loop in the event sheet?.

    Thanks

  • Have you tried running a simple test? I mean create a mini project with two nested loops that do something visible. Then stop one of them and see what happens. I'd be interested in the result.

  • There cannot be many loops running at the same time. If you use stop loop as a sub-event of the loop it will work as intended.

    For instance run loop 15 times

    L System|loopindex = 5 Stop loop

  • Hi Katala are you saying that Construct 2 can't handle nested loops?

  • Last time I checked

    "Stop loop

    Stop a Repeat, For or For each loop currently running. These loops are system conditions. The rest of the event's actions and subevents will still complete, but the loop will not run any further after that."

    So I would guess it stops, well, the current loop it is in.

    So if you have

    Repeat 10 times, for i from 0 to 10, stop loop

    It would stop the for loop

  • hundredfold

    Sorry I wasn't very clear. It definitely can. I just meant that even then it only affects that particular loop where you but the stop loop action. I mean C2 runs loop to the end and continues to the next event etc... Question was about all loops on the sheet.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is a very simple example you can do.

    From clearly technical standpoint they don't run at the same time it is more like run Y times for X times.

    If it would be a cube it would take much longer to run the whole thing.

  • Yes, that's pretty much how I understood it. Thanks.

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