Event running even without conditions matching.

Status
Not open for further replies.

raphapaguiar

Villager
Member
Joined
Sep 9, 2020
Messages
7
Reaction score
2
First Language
Portuguese
Primarily Uses
RMMV
Guys, I am at least 3h trying to understand what´s wrong.
So, a bit of context before my ask for help. :p

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)
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,920
Reaction score
11,871
First Language
German
Primarily Uses
RMMV
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.
 

raphapaguiar

Villager
Member
Joined
Sep 9, 2020
Messages
7
Reaction score
2
First Language
Portuguese
Primarily Uses
RMMV
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!
 

Arthran

Regular
Regular
Joined
Jun 25, 2021
Messages
1,228
Reaction score
1,897
First Language
English
Primarily Uses
RMMZ
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.
 

Byzantiumn

Villager
Member
Joined
Feb 1, 2023
Messages
28
Reaction score
20
First Language
English
Primarily Uses
RMMV
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.
 

Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,970
First Language
English
Primarily Uses
RMMV
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.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

Me with the fireplace, a space heater, and a heated blanket. My preferred lizard temperature.

I'm gonna riff on Macross's "Deculture" and adopt "Descope" as my motto! :wub God knows I'm gonna need it...

As an aside, did any of ya sweeties watch Macross Delta and if so, was it good, bad, or horrible?
Is an extension for the jam time limit from 20 min to 30 min possible? :ysad::ysad::ysad: My entry will have a few battles, it seems >.<
Background and composition study
GAbBmfDaIAAEzVM

Forum statistics

Threads
136,710
Messages
1,268,991
Members
180,430
Latest member
rpgmakergerhnam
Top