Set Movement Route Overwrites Autonomous Movement

Hello! I'm still a novice at RM, so I would like some tips for writing events.

I set autonomous movement to an npc to make it move by itself, and to make it continue to complete the route even when the Player gets in its way. Like this.

phplmovement3.png


Spoiler: Inside the route is this (might change later)
◆Set Movement Route:victim1
: :◇Move Up
: :◇Move Left
: :◇Move Left
: :◇Turn Down
: :◇Wait:60 frames
: :◇Move Left
: :◇Move Left
: :◇Move Left
: :◇Turn Down
: :◇Wait:60 frames
: :◇Move Left
: :◇Turn Down
: :◇Wait:60 frames
: :◇Move Right
: :◇Move Up
: :◇Move Up
: :◇Move Up
: :◇Turn Left
: :◇Wait:60 frames
: :◇Move Up
: :◇Move Up
: :◇Wait:60 frames
: :◇Move Left
: :◇Turn Up
: :◇Wait:180 frames
: :◇Move Right
: :◇Move Right
: :◇Move Right
: :◇Move Up
: :◇Wait:60 frames
: :◇Move Right
: :◇Move Right
: :◇Move Right
: :◇Turn Up
: :◇Wait:60 frames
: :◇Move Down
: :◇Move Right
: :◇Move Right
: :◇Move Right
: :◇Turn Up
: :◇Wait:60 frames
: :◇Move Right
: :◇Move Right
: :◇Move Right
: :◇Move Right
: :◇Turn Up
: :◇Wait:60 frames
: :◇Move Left
: :◇Move Left
: :◇Move Left
: :◇Move Down
: :◇Move Down
: :◇Move Down
: :◇Move Right
: :◇Move Right
: :◇Move Down
: :◇Move Down
: :◇Move Down
: :◇Turn Right
: :◇Wait:60 frames
: :◇Move Up
: :◇Move Left
: :◇Move Left
: :◇Move Left
: :◇Move Left
: :◇Move Left
: :◇Turn Down
: :◇Wait:60 frames
: :◇Move Left
: :◇Move Down
: :◇Move Down
: :◇Wait:60 frames
: :◇Switch ON:0079
: :◇SE:Close1 (50, 100, 0)

I want to make it so that when Player interacts with, in this case, a wine bottle, it will break and it will cause an NPC to move faster. Here's an example of my eventing.

phplmovement4.png


The problem is that when I do that, the "Set Movement Route: victim1 :Speed : 5 :Frequency : 4" somehow overwrites some of the movement in NPC sometimes, depeding on the movement and whatever. Let's say, in this case, the 5 "Move Left" becomes 4 instead.

If possiblie, please suggest a way to solve this. Thank you!

*P.S. I have another solution in mind, but I have to remove the "scarepoint -1" gimmick and use instant gameover instead. So, I want to find another way first.
Yes, it does, because Autonomous Movement is also a movement route, and a character can only have one running at a time. Each subsequent movement route cancels the one currently running.

It would have been really nice if you'd included the full event window in your screenshot. Don't crop stuff away, because everything in that window is important.

You will have to use a script call to change the victim's speed and frequency without interrupting the movement route. I could tell you what that script call needed to be, if only you had shown the whole window and I could see the event id.
since both are move routes, you'll have to find a way to define them based on fixed points.
as they are, they're always defined relative to the event itself, and since it moves, whenever the movement route changes, everything down the line gets thrown off course.

you can use map regions to define an area for the character to walk on, and those can be picked up from the move route.
that way, if you have to alter the base move route you can always send the event back to the beginning of it's original route, and recalculate from there.
since both are move routes, you'll have to find a way to define them based on fixed points.
the second move route that's cancelling out the first doesn't actually have any movement commands - it's just changing the event's speed.

In fact, looking over the events again, it's not a great design. You have a mini cutscene - NPC walks up to a set point, jump scare happens, NPC runs away - but you've put the processing on two different events. It's easier if you just put all the commands into a single event - either one of those, or another one that has no sprite - and let it control everything that happens.

For an example of this, look at the blog (link at top of page) and search for a post called "Events aren't NPCs: The Biggest Mistake in Cutscene Events" (or something like that).
Yes, it does, because Autonomous Movement is also a movement route, and a character can only have one running at a time. Each subsequent movement route cancels the one currently running.

It would have been really nice if you'd included the full event window in your screenshot. Don't crop stuff away, because everything in that window is important.

You will have to use a script call to change the victim's speed and frequency without interrupting the movement route. I could tell you what that script call needed to be, if only you had shown the whole window and I could see the event id.

Sorry for that. Here's the full view.

phplmovement3.png


Spoiler: Inside the route is this (might change later)
◆Set Movement Route:victim1
: :◇Move Up
: :◇Move Left
: :◇Move Left
: :◇Turn Down
: :◇Wait:60 frames
: :◇Move Left
: :◇Move Left
: :◇Move Left
: :◇Turn Down
: :◇Wait:60 frames
: :◇Move Left
: :◇Turn Down
: :◇Wait:60 frames
: :◇Move Right
: :◇Move Up
: :◇Move Up
: :◇Move Up
: :◇Turn Left
: :◇Wait:60 frames
: :◇Move Up
: :◇Move Up
: :◇Wait:60 frames
: :◇Move Left
: :◇Turn Up
: :◇Wait:180 frames
: :◇Move Right
: :◇Move Right
: :◇Move Right
: :◇Move Up
: :◇Wait:60 frames
: :◇Move Right
: :◇Move Right
: :◇Move Right
: :◇Turn Up
: :◇Wait:60 frames
: :◇Move Down
: :◇Move Right
: :◇Move Right
: :◇Move Right
: :◇Turn Up
: :◇Wait:60 frames
: :◇Move Right
: :◇Move Right
: :◇Move Right
: :◇Move Right
: :◇Turn Up
: :◇Wait:60 frames
: :◇Move Left
: :◇Move Left
: :◇Move Left
: :◇Move Down
: :◇Move Down
: :◇Move Down
: :◇Move Right
: :◇Move Right
: :◇Move Down
: :◇Move Down
: :◇Move Down
: :◇Turn Right
: :◇Wait:60 frames
: :◇Move Up
: :◇Move Left
: :◇Move Left
: :◇Move Left
: :◇Move Left
: :◇Move Left
: :◇Turn Down
: :◇Wait:60 frames
: :◇Move Left
: :◇Move Down
: :◇Move Down
: :◇Wait:60 frames
: :◇Switch ON:0079
: :◇SE:Close1 (50, 100, 0)

phplmovement4.png


since both are move routes, you'll have to find a way to define them based on fixed points.
as they are, they're always defined relative to the event itself, and since it moves, whenever the movement route changes, everything down the line gets thrown off course.

you can use map regions to define an area for the character to walk on, and those can be picked up from the move route.
that way, if you have to alter the base move route you can always send the event back to the beginning of it's original route, and recalculate from there.

Thank you! I'll keep this in mind for now though.
So if you get rid of the movement route on victim1 that's set in event 17, and replace it with this:

Code:
Script: $gameMap.event(5).setMoveSpeed(5);
       $gameMap.event(5).setMoveFrequency(4);

it should work.

However, what are you trying to do with the scarepoint variable on that event? Because you've got it set to Event Touch, those commands will never run unless the player interacts with the event. Maybe you should walk through what's supposed to happen (ie - what the player should see happen in the game), and we can help you determine if that's the best way to accomplish it.
So if you get rid of the movement route on victim1 that's set in event 17, and replace it with this:

Code:
Script: $gameMap.event(5).setMoveSpeed(5);
       $gameMap.event(5).setMoveFrequency(4);

it should work.

However, what are you trying to do with the scarepoint variable on that event? Because you've got it set to Event Touch, those commands will never run unless the player interacts with the event. Maybe you should walk through what's supposed to happen (ie - what the player should see happen in the game), and we can help you determine if that's the best way to accomplish it.

Thank you for the code! I'll try it out to see if it works or not.
My game is about Player scaring NPCs to accumulate points as high as possible. Player will lose points every time NPCs come to the touch. Changing Speed is one of the gimmick for making it harder to avoid their movement. Though I also consider an instant gameover and some other things.

Original thread: https://forums.rpgmakerweb.com/threads/set-movement-route-overwrites-autonomous-movement.120568/