The NPC kept jumping even when I set the route to 'Fixed" and the event list empty

Hello again, everyone. Here's another thing that stumped me to no end.
Picture No. 1 and 2 is the event list for the NPC in question. With No. 1 being fixed and No. 2 being routed to jump in place. Picture No. 3 and 4 is the tent door.

So the premise is this: On default, the NPC would turn left and right and jump sometimes. When spoken to, he will stop jumping and talk to the MC. This works fine.

The problem is this: When I interact with the door, I want the NPC to turn towards the player, then speaks. This works fine... EXCEPT that he keeps jumping, He faced my character just fine, but he, keeps. jumping.

I tried everything I could think of to fix this. The pictures you see is like the fifth iteration of the event list and pages. I am totally stumped.

So... Please help me!
there are 2 solution I can think off.

variable = 0 should work, but the NPC IS in PARALLEL, so it need
to interact to stop it.

so variable -1 wont work either.

So here is what you could do in changing the event.

let it jump when its <= to 0
do nothing here,
else
variable +1 (or selfswitch)
end

page 2 = if variable > 1 to activate.

this can be done by the door as well.

solution 2:
force the selfswitch A on event 6 to be ON below variable = 0.
this can be done by a scriptcall,
var key = [mapID, 6, "A"]
$gameSelfswitch.value(key, true);

and it should work, otherwise, I dont know either.
I don't see where you're doing anything to stop him from jumping. Autonomous movement will run during other events - that's what it's designed to do, so that when you're talking to one NPC the rest of the town doesn't freeze.

So if you want his movement to stop when you're interacting with a different event, you need to turn OFF his self switch A, which is what's meeting the condition for his jumping page.

But, then, I don't really get the logic of your events overall. You're using both a self switch on the event and one of the game's variables. But you're only using that variable to be 1 or 0, so why aren't you using a switch? Are you using that DontGoInCulture variable for something else later on?

The easiest way to do this would be:
1 - Choose one of your switches to be the DontCulture thing.
2 - Take that parallel off of the first page of event 6 and delete the contents
3 - Get rid of the Control Variable commands in event 25
4 - Add a Control Switch command at the beginning of event 25 to turn the Culture switch OFF, and at the very end of event 25 to turn your culture switch ON
5 - Make the condition for page 2 of event 6 be the Culture switch ON
Edit: looks like someone beat me to it 😀

The merchant continues it's custom movement, because you are "talking to him through the tent door event". If you want the guy to stop jumping, you have to talk with the guy. So, I think you should activate a different page for the merchant guy without the custom route, when you activate the tent door event.
@ATT_Turan I'll try your list of things. I did think that I should do something to make him stop, but I just couldn't reach to the "how" of it. And, yeah... I will be using the DontGoInCulture as a trigger for a quest far down the line. I am only using switches for story quests and major side quests that will continue and progress far down the line and I use variables for anything else in-between. I do that in an effort to make things more organized(?) kinda.

@rpgLord69 I thought that too... I just don't get HOW can I do that lol... Maybe it's because I'm still tired? Most likely because I'm just that slow lol.
I'll try yours too @ShadowDragon. I'm gonna rest after making this work. I think my head need a little free time xD.
Well, if you want to use variables, just have the tent door event control random variable = 1 and then make a 3rd page (fixed movement) for the NPC, with a trigger random variable is greater or equal to 1. That should work, I think.
I will be using the DontGoInCulture as a trigger for a quest far down the line. I am only using switches for story quests and major side quests that will continue and progress far down the line and I use variables for anything else in-between. I do that in an effort to make things more organized(?) kinda.
Seems to me that should be opposite, that you use a switch for something that happens one time and one variable that tracks how far along you are in your story (e.g. I've progressed to stage 7 of the storyline). But however you organize it for yourself is fine, it just needs to work logically with your events.

So if you prefer to stick with a variable, you need to change which direction it's going, as event pages check for a variable to be higher than or equal to a value, not lower, so you can't progress from 1 to 0.

Or you can use a self switch on page 2, exactly like how you do now, and use a script call to manage it in event 25. So at the beginning of 25 you'd do a script box that says:
Code:
$gameSelfswitch.value(X, 6, "A", false);
and at the end
Code:
$gameSelfswitch.value(X, 6, "A", true);
where X is your map ID.

Then you don't need to refer to any of your game variables or switches at all.
@ATT_Turan Ah, what I meant is that I only use the switch as a single time trigger that the player would activate. To manage how far the quest has progressed I use variables. Think of it like my very own quest log as the dev. I use it to track how many quests I put into the game or something like that. The script call sounds like a very convenient tool to use... But at the moment I don't think I could learn to use it in my daily making of the game. One is because I know nothing about coding or what it meant and two because currently, my head is so full since I'm juggling a ton of things at once at the moment. I don't think I could put more things in it. Even now I am barely hanging on to my sanity lol.

But, still, if I fail to make it work I'll use the code you gave me and try to remember it as best I could. I guess I'm just being obstinate since I'm too tired. I mean, I could just use the code and write it somewhere so even if I forget, I would still use it. Or even come back to this post again and reread your replies... It's a hard thing to describe.

Sorry for the small rant there. It's been stressful.
I'm not sure what you need to learn or why you'd need to remember something, you would copy what I typed and paste it into the event command.

But whatever method you want to use is fine, you've been given at least two ways to make it work. Good luck.
@ATT_Turan Thanks. I managed to make it work just now. All the suggestions and failures up to this point help me make it work. Don't worry about the "why" of my decision. I also don't really know myself. I guess I just went based on my feelings at the moment. I may change it once I'm not as tired as I am currently.

Speaking of the code, I wasn't able to make it work. I typed the correct ID for everything, yet the event didn't change. You don't need to reply to this btw, I was not asking for help with this, I was just wondering out loud. I'll just experiment with it more sometime in the future since I don't wanna disturb anyone anymore (at least for today). Again, thanks for the help. I really appreciate it.

Original thread: https://forums.rpgmakerweb.com/threads/the-npc-kept-jumping-even-when-i-set-the-route-to-fixed-and-the-event-list-empty.145592/