Event running even without conditions matching.

Guys, I am at least 3h trying to understand what´s wrong.
So, a bit of context before my ask for help. 😛

The scene is:
1- The hero enters at the Pub. The waitress come to him to ask for help with the costumers.
In this point there is a variable call "Waitress Quest" sets to value 1 (because the quest will continue later so I will only add a new value for the variable to go to the next step of the quest.
2- She waits for you in the bar counter to give you the first part of the quest, that is, pick up some beer at the barrel and give it to the clients in the bar. (In this part there is a new Variable called "Berr clients" sets to 1)

Untill here everything is ok.

The problem is:

You can talk to the clients at the bar before taking the first part of the quest (step 2). The clients have 3 pages each in its event:

page 1.png
page 2.jpg
page 3.jpg


The second page of the event is with the condition to only happen if the Variable "Beer Clients" is higher than or equal to 2, but even without the variable in this value, when I talk to the npc it´s executing the second page.

Same happens with the barrel where I should take the beer: It is supposed to only work with the same variable >= 1, but it´s executing even with the variable in 0 (i know the value because I asked to show me the value in one of the dialogues.

Anyone can help me? What am I doing wrong?
(Pretty sure it's something obvious that I am not seeing)
if the Variable "Beer Clients" is higher than or equal to 2, but even without the variable in this value, when I talk to the npc it´s executing the second page.
You've made a wropng assumption here.

if the second page is active, then the condition IS fulfilled.
And that means something changed the variable without your knowledge.

there is either another event modifying the same variable, or the variable has been falsely configured in a plugin.

And the last option is the more often happening, because too many people add plugins without configuring them - or without understanding what the configuration means.

So you need to look into where that variable is changed and have to find the use that is wrong.
And that means something changed the variable without your knowledge.
Yep! I figured it out. The problem was that i am using a Day Night Plugin that was saving the seconds values into the same variable I was using as the "Beer Clients" Variable. So, while I was thinking it was in value 0, it was actually raising constanty per second. LOL.

Pretty obvious, as I said! LOL. But thanks anyway! Now it's working perfectly!
Just as a tip for future reference, while playtesting, you can press F9 to bring up a debug menu where you can see all your variables and the values they contain at any given moment.
What I recommend doing for quest systems is building as much as you can into common events. You can put the entire games quests into one common event and simply put an event on each map that calls for both the isGameStarted status and then the contents of what you need to reference, say trigger some switch that sets off a conditional in your common event or the like.
This keeps your maps clear of event clutter and is easier to get a rasp of what connects to what in your questlines.
And whenever you add a plugin to your game, check its help file and parameters to see if it uses any switches or variables. If it does, make sure they're not switches/variables you're already using - change them if you need to. Then go in and give those switches/variables names so you know they're used by the plugin and you don't accidentally use them for something else days/weeks/months down the track.

Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/event-running-even-without-conditions-matching.155523/