So I'm a complete no0b, but i have managed to make an NPC and have him move along a custom route. I have finally managed to get the NPC to say 3 different things every time you talk to him using switches, but by doing this he restarts his custom route from wherever he was standing when spoken too. As you can imagine this messes his route up completely. I have already un-ticked "Skip If Cannot Move" and this hasn't helped. Is there anyone out there that can help me?
Cheers people! :)
How to stop an NPC resetting route after dialogue [MV]
● ARCHIVED · READ-ONLY
-
-
Could you post a screenshot of your current event page set-up?
-
If you are wanting random messages you can do that with variables instead of switches? And I would use self switch instead of an actual switch.
Please also provide a screenshot. -
Hi sorry yes i meant self switches and no i dont want random dialogue, i want it to cycle, which is what it is currently doing :) Here is the screenshot...
https://image.ibb.co/eAak9T/mikey.png -
I'm guessing each time you activate a self switch (and a new page becomes active) the custom movement starts again.
Try using just one page and use the method outlined above:
Control Var (Random 1-3)
If Var = 1 ...
If Var = 2 ...
If Var = 3 ... -
If you don't want random dialogue but in order it could still be done with 1 event page and 1 variable and conditional branches. Have conditional branch if variable NPC = 0 then dialogue and +1 to variable NPC, if variable NPC = 1 then dialogue and +1 to variable NPC, if variable NPC = 2 then dialogue.
-
but by doing this he restarts his custom route from wherever he was standing when spoken too
you can probably add a small custom route manager that'd keep the NPC moving along a path or an area, and it wouldn't matter where it ends up when it's done talking.
region IDs are useful for this.
basically, "move if region == X", "turn if not".
since it's always evaluating the region in front of it, it would never step out of it's intended path, because it won't move unless (region == X), and it would turn, and it would test again, and so on.
you can put that as the moving route, and use one page, as stated above.
if you need a kind of "patrol route" route, you can order it to move "in whatever direction the region ID states", and you'd basically draw the path you want onto the floor.

-
Thanks all for your help but i couldn't get it to work, i'm clearly doing something wrong :) I've just changed his route to stop it messing up.
-
You know Yanfly's move route core might help. Instead of move commands like move left, move left, move down, etc and hope everything is where it's supposed to be, you can use a point argument. MOVE TO: 8, 4 This way if your NPC gets interrupted he'll just continue to point 8, 4 on the map or whatever.