My loop keeps causing the game to lag whats wrong with it?

Screenshot (119).png
What if you moved the "intro is ON" condition inside the loop and added the "Break Loop" statement inside of it if the condition is true.
What if you moved the "intro is ON" condition inside the loop and added the "Break Loop" statement inside of it if the condition is true.
Like this? I think i did it wrong because its not working

Screenshot (120).png
I think you misunderstand the utility of a loop
Loops are used to do the same thing multiple times, untill a condition is met.

What is the utility of a loop in your case?

Simply let go of the loop and put
Intro = ON
Flashscreen


If you want your screen to flash the whole time during Intro = ON status you need to apply that logic to it

Code:
♦ If Intro = ON
  ♦ Flash screen
♦ End

But, you would need to set this event as parrallel, and make sure you have some other event to turn Intro OFF, otherwise it will run indefinitely.
how is the event being triggered?

second, your original problem was that intro = off did not stop the loop, it only had it looping without commands. You should consider using conditions instead of conditional branches, that would disable such a loop.
I think you misunderstand the utility of a loop
Loops are used to do the same thing multiple times, untill a condition is met.

What is the utility of a loop in your case?

Simply let go of the loop and put
Intro = ON
Flashscreen


If you want your screen to flash the whole time during Intro = ON status you need to apply that logic to it

Code:
♦ Loop
  ♦ If Intro = ON
    ♦ Flash screen
    ♦ If Intro = OFF
      ♦ Break Loop
    ♦ End
  ♦ End
♦ Repeat Above

But, you would need to set this event as parrallel, and make sure you have some other event to turn Intro OFF, otherwise it will run indefinitely.
its working but again causing my game to lag when ran
if you event is "parallel" the loop is not required, just set a "Intro Switch ON"
and turn it off inside your "autorun" event.

Parallel event and loop inside = major lags (unless in action trigger event)
and done correctly.
if you event is "parallel" the loop is not required, just set a "Intro Switch ON"
and turn it off inside your "autorun" event.

Parallel event and loop inside = major lags (unless in action trigger event)
and done correctly.
Yup... my bad
I mean regardless of whatever else you're doing here, the loop isn't a parallel event, meaning it will stop everything for as long as it runs, so it flashes the screen for 70 frames, then flashes the screen for 70 frames, flashes the screeen for 70 frames, flashes the screen for 70 frames, flashes the screen for 70 frames, flashes the screen for 70 frames, flashes the screen for 70 frames, flashes the screen for 70 frames, flashes the screen for 70 frames, flashes the screen for 70 frames, flashes the screen for 70 frames.

With no way to turn it off because no other event will run to turn off that switch you got going.

Original thread: https://forums.rpgmakerweb.com/threads/my-loop-keeps-causing-the-game-to-lag-whats-wrong-with-it.170851/