MZ Label usage in dialogue branches creating endless loops?

I made a fake event to make it easier to read through as it has to the same issue as my real events.
When I use labels in a conversation, it will loop through ALL possibilities if you choose any option.
In my example screenshots you will endlessly "receive" apples and oranges with no escape, no matter what. Adding an "end" label or adding exit event processing does nothing.
What am I misunderstanding here?

TEST EVENT DIALOGUE ERRORS.png
TEST EVENT DIALOGUE ERRORS VERSION 2.png
labels should be "outside" the choice.

so if you want an apple, jump to label "Apple"
same for orange.

you can put it below and inside the 2nd choice "jump to label end"
or use a selfswitch + event exit processing afterwards.


exit event processing stops the event from running further unless interacting with it again.
another smart choice to stop the loop is check the selfSwitch if its on or off.
if its ON, skip it, else run it.
Your code is currently saying "If they choose Apple, then if they choose orange jump to ORANGE, give them an orange, then if they choose an apple, jump back to APPLE" so of course if you keep choosing apple and then orange and then apple and orange again, then it will keep repeating.

If you only want to give them 1 apple, and then 1 orange, then after giving an orange, why did you give the choice to get another apple again?

Or otherwise, if you're saying the actual problem is that choosing "Exit Conversation" doesn't end the whole thing, then the more likely issue that you're not showing in a screenshot of the whole event is that you've either put this inside a loop or an auto or parallel process trigger, with no switch to turn the page off afterward
Your code is currently saying "If they choose Apple, then if they choose orange jump to ORANGE, give them an orange, then if they choose an apple, jump back to APPLE" so of course if you keep choosing apple and then orange and then apple and orange again, then it will keep repeating.

If you only want to give them 1 apple, and then 1 orange, then after giving an orange, why did you give the choice to get another apple again?
As long as its chosen that way it's fine, sorry if my post was confusing this was just an example event.
In this example getting infinite apples or oranges is fine, but if i want to EXIT the event at any point, it just replays ALL of the choice options. Even picking an apple will also replay the orange option.

Simpler example:
event - "apple or orange?"
player - "neither, exit"
event - "here is an apple!"
(loop begins)
player- "exit"
event - "here is an orange!"

infinitely.
If you're saying the actual problem is that choosing "Exit Conversation" doesn't end the whole thing, then the more likely issue that you're not showing in a screenshot of the whole event is that you've either put this inside a loop or an auto or parallel process trigger, with no switch to turn the page off afterward
labels should be "outside" the choice.

so if you want an apple, jump to label "Apple"
same for orange.

you can put it below and inside the 2nd choice "jump to label end"
or use a selfswitch + event exit processing afterwards.


exit event processing stops the event from running further unless interacting with it again.
another smart choice to stop the loop is check the selfSwitch if its on or off.
if its ON, skip it, else run it.
Can you elaborate on "outside" the choice? Can labels not be used the way I'm trying to use them?

The way I'm looking at it I'm jumping to the appropriate labels each time a choice is being picked.
And exiting, even with "exit event processing" won't exit the event. It just loops the choice texts.

What I'm trying to do is create branching dialogues like this, even for, say, a shop:

Event - "Welcome to my shop!"
Options -
A1. Browse wares
B1. Talk to shopkeep
C1. Exit

-A1.
LABEL: SHOP
(shop options ect)
(expectation here is that it would end event after exiting shop or i would jump to the exit label)

-B1.
Shopkeeper: Generic dialogue, asks player to buy something
Options -
A2. Buy something
B2. Keep talking
C2. Exit

--A2.
Jump to label: SHOP

--B2.
(continues dialogue)

--C2.
JUMP TO LABEL: EXIT

-C.
LABEL: EXIT
(ends event)
If you're saying the actual problem is that choosing "Exit Conversation" doesn't end the whole thing, then the more likely issue that you're not showing in a screenshot of the whole event is that you've either put this inside a loop or an auto or parallel process trigger, with no switch to turn the page off afterward
Screenshot 2026-03-12 152043.png

Screenshot 2026-03-12 152720.png

Unfortunately no, I even made this test event as simple as possible specifically to try and figure out the error of my ways. I've had this issue with multiple of my events trying to make looping choice dialogue and can't figure it out.

And on my other events choosing ANY option would create a loop which causes the event to regurgitate all of the choice dialogue
It's always possible you might have a plugin doing something funny with labels. Have you tried this in a new project with no plugins?

Otherwise, maybe it just doesn't really work to jump between labels nested inside multiple Show Choices. Maybe jumping between them resets the choice somehow. You should probably not be using labels like this and maybe be putting the whole thing inside a loop instead and then put "Break Loop" under the Exit choice.
Hi!
I just repeated your first event, and it worked just fine for me:
1773356016903.png

1773356046262.png


What is on the other pages?
View attachment 362619
View attachment 362620
Unfortunately no, I even made this test event as simple as possible specifically to try and figure out the error of my ways. I've had this issue with multiple of my events trying to make looping choice dialogue and can't figure it out.

And on my other events choosing ANY option would create a loop which causes the event to regurgitate all of the choice dialogue

If you are willing, upload your project here. Maybe I or someone else can take a better look at this.
Hi!
I just repeated your first event, and it worked just fine for me:
View attachment 362621
View attachment 362622

What is on the other pages?


If you are willing, upload your project here. Maybe I or someone else can take a better look at this.
It's actually really funny that you responded to this- I was just going through plugins to figure out what might be causing it, and it's your message common event plugin, when ignore choice is FALSE.

But this isn't a huge deal as the plugin didn't end doing exactly what I needed and I was using it as more of a fail-safe then anything else, since I have too much going on in my event dialogues for it to be used how I wanted it to. I'll probably be better off manually calling common events anyway, haha.

Thanks for your willingness to look into it that far though, you're very kind!
It's always possible you might have a plugin doing something funny with labels. Have you tried this in a new project with no plugins?

Otherwise, maybe it just doesn't really work to jump between labels nested inside multiple Show Choices. Maybe jumping between them resets the choice somehow. You should probably not be using labels like this and maybe be putting the whole thing inside a loop instead and then put "Break Loop" under the Exit choice.
I found the issue! It was, of course, a plugin. I didn't think it would cause something like this but it did.
I'm just glad my logic was sound, I was getting worried lol.
labels should be "outside" the choice.
This doesn't make any sense. Labels can go anywhere you want to put them.

Can you elaborate on "outside" the choice? Can labels not be used the way I'm trying to use them?
Labels can absolutely be used the way you're using them. It's supposed to be safe to jump from a label anywhere to a label anywhere else… but of course, plugins could mess with that, as you just found out.


Like Eliaquim, I was able to make your event work exactly as posted in the opening post. It did manage to uncover a bug in one of my work-in-progress plugins though, so I suppose I can thank you for that. 🙂
It's actually really funny that you responded to this- I was just going through plugins to figure out what might be causing it, and it's your message common event plugin, when ignore choice is FALSE.

But this isn't a huge deal as the plugin didn't end doing exactly what I needed and I was using it as more of a fail-safe then anything else, since I have too much going on in my event dialogues for it to be used how I wanted it to. I'll probably be better off manually calling common events anyway, haha.

Thanks for your willingness to look into it that far though, you're very kind!
That is strange, because I did this test on my sample project, and this plugin is there, with that configuration:
1773369142597.png

I think maybe it depends on the content of the common event you used?
You could also disable the plugin with a switch in cases like that.
Anyways, I will investigate it now to see if I can replicate the problem.

Glad the system is working for you now! Have fun!
This doesn't make any sense. Labels can go anywhere you want to put them.
outside is to avoid loopings, but if you want a loop, this can work.
I rather organize stuff so you can have less lines that could do the same.

it also depends on the mechanic you build and how you jump around them.
That is strange, because I did this test on my sample project, and this plugin is there, with that configuration:
View attachment 362635
I think maybe it depends on the content of the common event you used?
You could also disable the plugin with a switch in cases like that.
Anyways, I will investigate it now to see if I can replicate the problem.

Glad the system is working for you now! Have fun!
Only thing I had was turning on/off a switch that controlled access to my picture menu common event.

But I just added the plugin to a test game with no other plugins (except elibook) and empty common events. I get the same result as long as the "plugin enabled switch" is turned on, and "ignore choice" is false.
Hopefully that info is useful to you!

Original thread: https://forums.rpgmakerweb.com/threads/label-usage-in-dialogue-branches-creating-endless-loops.182838/