i can't seem to figure out how to loop this event, could anyone help me with this?

i'm back again
(hopefully for the last time in a while...)
ive been working on a cafe minigame where you give orders to customers through an event, (see these threads i made in the past) and 4 other common events acting as buttons through images, and the customer itself
I've gotten everything done besides starting the customer process again after they've been served
(making the current one disappear, and then the new one appearing)
but when the button for the order is pressed, it just brings the buttons back up, and doesn't loop the event 😩

ezgif.com-optimize_5_1.gif


here's the event code for more context
event code for event​
1699997852502.png
1699997886969.png

customer code
1699997935787.png


button 1, 2 and 3 (each are very similar)
1699997967455.png

1699998005562.png

1699998032325.png

ps: sorry about last thread's miscommunication dilemma, i'll try to remember to screenshot the whole thing
ps: sorry about last thread's miscommunication dilemma, i'll try to remember to screenshot the whole thing

And yet...you didn't. You've cropped your screenshots way down so we can't see any of the actual event settings from the editor.

I assume the lower pictures are separate events...how are any of them supposed to lead to the top one? I don't see any common event call or anything.
And yet...you didn't. You've cropped your screenshots way down so we can't see any of the actual event settings from the editor.

I assume the lower pictures are separate events...how are any of them supposed to lead to the top one? I don't see any common event call or anything.
it's because they're all the default settings (except for the trigger being parallel) i'm sorry
i'll swap out the screenshots real quick

and also, i'm using yanfly's image common event plugin which calls the common events



edit: swapped!
Parallels loop automatically, which means a loop around a parallel event does nothing.
It will mess up your timing hoever, so please remove the loop and test again.

and do yourself a favor and name your variables and switches after what they are actually doing, and name all such switches and variasbles - not like the switch 1 that you kept without a name despite using it.
Parallels loop automatically, which means a loop around a parallel event does nothing.
It will mess up your timing hoever, so please remove the loop and test again.

and do yourself a favor and name your variables and switches after what they are actually doing, and name all such switches and variasbles - not like the switch 1 that you kept without a name despite using it.
i didn't notice any changes when i got rid of the loop, is that me misunderstanding?

(also, switch 1 was a placeholder because i was testing if the common event needed to be parallel)
1700002830314.png

1700002788396.png
i didn't notice any changes when i got rid of the loop, is that me misunderstanding?

(also, switch 1 was a placeholder because i was testing if the common event needed to be parallel)
View attachment 283872
View attachment 283871
I'm not sure what you are trying to do with that jump to label inside the conditional branch, but it doesn't actually do anything. If the condition is true, it will jump forward a few lines. If it's not true, its contents will not run, and the interpreter will continue to instructions after the conditional - the same instructions it would have jumped to if the condition was true.

So whatever you wanted it to do, it's not doing that.
I'm not sure what you are trying to do with that jump to label inside the conditional branch, but it doesn't actually do anything. If the condition is true, it will jump forward a few lines. If it's not true, its contents will not run, and the interpreter will continue to instructions after the conditional - the same instructions it would have jumped to if the condition was true.

So whatever you wanted it to do, it's not doing that.
oh, really?
i was trying to use the condition variable in the common events to basically restart the entire thing when the correct button was pressed, but i guess that doesn't work 😅
i didn't notice any changes when i got rid of the loop, is that me misunderstanding?
I said that the loop has no function, so of course removing it won't change how the event itself behaves.
timing problems are interactions between different events.

you might want to follow the link "bughunting" in my signature to learn more.
oh, really?
i was trying to use the condition variable in the common events to basically restart the entire thing when the correct button was pressed, but i guess that doesn't work 😅
Ah, I think I see where the misunderstanding is here.
So, an event is a just a list of steps that the interpreter will execute in order. You've probably figured out as much. Now, a conditional branch is just another kind of step - if the condition is true, the steps inside will be executed; if it's not, they won't be. Either way, after it the interpreter moves on to what's below it.

I'm guessing what you thought it did was that whenever the condition became true, it would then be immediately executed out of order. That kind of thing is generally quite difficult to accomplish - and probably not what you usually want either, since you probably wouldn't want the interpreter to stop mid-command.


As to your main question - your even does loop - every frame in fact, since you've made it a parallel event. You just have a script that won't show a new customer if there's a picture already present, and I don't see anything that would ever remove that picture.

Original thread: https://forums.rpgmakerweb.com/threads/i-cant-seem-to-figure-out-how-to-loop-this-event-could-anyone-help-me-with-this.162943/