Text looping in common event

In an event you can stop text from looping by using a selfswitch.
How can you do this in a common event that has to keep running?
In the attached event, the 1st txt keeps looping when the variable hits 11.

thanks!
you can't - a common event either runs or runs not, same as with any parallel process.
If you don't want the messages to repeat, then they can't be in the same common event that has to repeat.

But why do you even set it to loop? I see nothing there that needs the event to be a parallel process.
I assume that "count herbalism" is a variable? then make this common event without trigger and have it directly called whenever that variable changes, that would be the proper way to do this.

If you can't do that, you'll need to change the logic so that it only reacts if the variable is changed, and not constantly looping. That will require another conditional branch on a second variable for comparison outside the existing branches.
if a variable is greater than 25, by definition it is greater than 10.
both sets of instructions validate.

try flipping it over, and putting the check for greater than 50 first, and work your way down.
after each block of instructions, before ending the conditional, call for an exit event.

see if that solves the problem.
if it does, you'll need to use if/else conditions and make a more complex evaluation, just so that only one set of instructions is valid every time.

(that, in bold, is pure programming logic.... that's what you need to learn, before coding.)
Because parallel events keep repeating themselves until they're turned off. If your variable reaches 10 or higher, the text will loop, because the parallel event continues to repeat itself and continuously meets its requirement to show the text. An additional switch that checks whether or not a dialogue has been used, and then the text under that switch's conditional branch should prevent the text from looping.
Thanks for answering guys!!!

@Andar : I don't really understand what you mean with: "have it directly called whenever that variable changes".
It changes everytime you "use" a flower. If I put in the event then, won't it keep on running aswell?

@gstv87 : You taught me a great and usefull lesson! Thank you...and, indeed your explanation seems logic when you look at it from a different perspective 🙂.

@Milennin How do you use a switch to check if a dialogue is been used?

sorry for the probably silly questions :/
no - because to call it from an event, you need to disable the parallel process.

If you aren't sure, show a screenshot of the event that increases the variable and I'll tell you how to include it there.
@Milennin How do you use a switch to check if a dialogue is been used?
Conditional branch to check if switch is off, with the dialogue within that branch and command that turns the switch on. That way, it skips over the branch after the dialogue has been accessed once.
@Andar :
alright, I think I got it. I placed the level event at the end of the event that will increase the variable as the pic shows.
It works fine now! I put the event in every other event that will increase the same variable...right? (from what I'm experimenting it seems okay!)
You sir are awesome!

@Milennin :
Ah I understand now. That's a possiblility aswell. On the other hand, if the event is only checked when the player examines a flower, it will reduce memoryusage...right? Thanks for thinking along!!!

Original thread: https://forums.rpgmakerweb.com/threads/text-looping-in-common-event.78124/