How to make Harvest Moon like NPC moving from one place to another?

They see the NPC event repeating because the NPC switches are not turned off/on until the NPC is finished moving.
make the sequence as intended, but add an "erase event" at the beginning and an "exit event process" at the end.
that *should* remove the NPC in further visits.

what you're witnessing is a problem inherent to sequences and linear time: an object can't be in two places at the same time, and for it to appear at it's new location, it has to disappear from the previous one first.
which, never happens if the sequence that makes it disappear, never finishes.... which never will, if the player doesn't stick around for it to finish.
make the sequence as intended, but add an "erase event" at the beginning and an "exit event process" at the end.
that *should* remove the NPC in further visits.

what you're witnessing is a problem inherent to sequences and linear time: an object can't be in two places at the same time, and for it to appear at it's new location, it has to disappear from the previous one first.
which, never happens if the sequence that makes it disappear, never finishes.... which never will, if the player doesn't stick around for it to finish.

What I did to get around that is "IF switch NPCISLEAVINGHOUSE is ON" inside the event to exit the house, then NPC has exited house is on.

I did what you said on the event but that didn't fix the problem. The switch thing I did works instead of what you said. The even seems broken now since I add the ERASE stuff.

Is there an easier way?

I'm using parallel process to check what time of day its is, FOR EXAMPLE if timer is greater than or equal to 60 move the NPC to this spot
Thats what iam working on =). I stumbled into the same problem constelation.

NPC Helgas Eventpage Condition: (This is subject to drastical changes)
On Map 001
Page1 VarX >= (-1) Helga comes Home
Page1 VarX >= 0 Helga in Bed
Page2 VarX >= 1 Helga leaving Home
Page3 VarX >= 2 Empty Eventpage (Helga is allready on the next Map)
On Map 002 Helgas Eventpage Conditions are:
Page1 VarX >= 2 Helga comes to Market
Page1 VarX >= 3 Helga at Market
Page2 VarX >= 4 Helga leaving Market
Page3 VarX >= 5 Empty Eventpage (Helga is allready on the next Map)

If Helga starts leaving Home you need more than one Switch at the end of the Moveroute, you need also another different one at the Start of the Moveroute (Lets call it, "allready moving dont repeat"). + A Paralell Event on every Map which runs a check if that Switch is ON and than turns it off and adds +1 to Action Variable and than Erases itself. But than Player and Helga enter next map simultaneously, so we have to insert more conditions...(not today sorry)
Like i said i try to post something tomorrow, but cant promise it, not much time and its complicated so not sure into which problems we run next =).

Edit: Sorry my first Idea with the Switches proofed to be Suboptimal and sent you in the wrong direction, i didnt know at that point of time. I hope the Variable for Page Condition proofs to be better in this case.
What I did to get around that is "IF switch NPCISLEAVINGHOUSE is ON" inside the event to exit the house, then NPC has exited house is on.

no... don't use switches.
I've been there, I dealt with the same problem.
usually you'd have to define a situation with multiple switches for it to work correctly, but you can't use more than two for controlling an event.
so, I just got rid of switches altogether, and came up with the hour method I've been telling you about: the sequence can only go forward, so, use a counter! the counter can only count forward!

Page1 VarX >= (-1) Helga comes Home
Page1 VarX >= 0 Helga in Bed
Page2 VarX >= 1 Helga leaving Home
Page3 VarX >= 2 Empty Eventpage (Helga is allready on the next Map)
On Map 002 Helgas Eventpage Conditions are:
Page1 VarX >= 2 Helga comes to Market
Page1 VarX >= 3 Helga at Market
Page2 VarX >= 4 Helga leaving Market
Page3 VarX >= 5 Empty Eventpage (Helga is allready on the next Map)

see?

although X >= 3 can also imply X == 4, when !(X == 5).... X == 5 is definitely X != 4 and X != 3
but you get the idea.


(this whole problem and solution is how I came up with my quest manager and scene manager! it works! use it!)
But how is the variables going to work unless the player is on the screen with the event? Can gstv8 show me a visual example please?
answer me this:
you're standing at the house's door, it's time for the NPC to exit, you wait for it, it exits, you see it head towards it's intended destination.
you let it get a certain distance away, and you walk into the house.
there shouldn't be anyone there, and there isn't.... the NPC has just gone out.
what happens when you exit? does the NPC start back at the door?
answer me this:
you're standing at the house's door, it's time for the NPC to exit, you wait for it, it exits, you see it head towards it's intended destination.
you let it get a certain distance away, and you walk into the house.
there shouldn't be anyone there, and there isn't.... the NPC has just gone out.
what happens when you exit? does the NPC start back at the door?

I cannot answer what I have not tested nor try yet. I still would like a visual and would like to try what you are sharing. But I do not know how to set up what you are saying.

With the method, what IF the player does not wait for the NPC to exit?
With the method, what IF the player does not wait for the NPC to exit?

I believe I recently tested that, and the event would still move even if the player is not looking (I tested *something*, involving movement. I don't remember if it was exactly that, but I printed out the event's position and it was moving while I wasn't looking)
so, you could just wait for the event to pass by, at the point were it would transfer ("Transfer", because it doesn't really transfer) to another map, and it will come to you as expected.
BUT, if you changed maps and then came back, the event would either respawn back at the beginning, or not spawn at all (because the condition for spawning, the time of day, would no longer be true)

I understand what you're trying to do, but you have to understand that the more you try to approach the real world behavior, the more restrictions you have to mimic from real world facts, such as *TIME*.
and those restrictions involve more complex move routes, more complex conditions, more complex detection of the player status, etc.
"this NPC wanders towards that point, and at this time of day it changes route".... yes, but what happens if that NPC is stopped by the player mid way towards it's intended destination? any time that NPC spends not-moving towards that destination, is time it would be delayed from meeting it's intended spawn point at the next change of route!
if you want to keep that consistent, you have to restrain the movement and add a check for the case when the NPC would be stopped by the player.
the more checks, the more conditions, and the more conditions, the more switches... and if you control the whole thing with switches, the more pages you have to work out, because each page only allows for 2 switches.
Okay. I'm seriously considering not having this at all then. 😩
Thanks for the help anyways.

I'll just have the NPC stay stuck forever in the house....
it can be done.... just maybe not as dynamic as you had envisioned.
it can be done.... just maybe not as dynamic as you had envisioned.

Can you share an example please? I'm all ears/eyes.
it's gonna take some time.
I can PM you a whole exposition once I have it.
what happens when you exit? does the NPC start back at the door?
No he doesnt, the moment he started moving he turned the Switch"allready moving" ON,
the moment the player entered the house, the paralell event there would execute a codeline and erase itself. The code would be:
If "allready moving" is ON than Control Variable " Helgas Current Action" += 1.
Now when Hero leaves house, the npc will not start over but the npc will allready be at the Marketplace.

But this solves only part of the problem. there are more constellations, sadly i just got my coffee.

Edit:
I doubt i find a Solution, iam back to step one planing the movement from room A to Room B and all cases which prey behind every corner =). Sorry wasnt at home today, just got to it for a few mins. And my head smokes =)

In Bed VarX = 0
going towards checkpont a VarX = 1
Going towards next Room VarX = 2
being in between rooms VarX = 3
When Player arving to next map
case1- Hilda allready at checkpoint b VarX = 5 (We saw here leaving last map or left while she arrived at this map or the time variable did it)
case2- Hilda arriving in a few moments,she was allready seen moving on prior map VarX = 4A
case3- She wasnt seen starting here movement on the home map, so she will arrive on time.VarX = 4B
The 3 cases arrise from the player changing maps.
On Market VarX = 6
going towards checkpoint b VarX = 7
going towards home map VarX = 8
being in between rooms VarX = 9
When Player arving to next map VarX = 11 or 10A or 10B
arriving at Checkpoint a VarX = 11
arriving in Bed VarX = 12, resett to 0

Now with Hildas "Action Plan" i can go and try if there is a Way to achieve this.
I hope there arent arissing more obstacles.

Edit:
If Hilda is on the same Map as Player but out of his Vission, than her Moveroute will not start, unless its given to her by another event or to herself while she was paralell for a second. this brings new problems if your maps are not oldschool smal.
(There are ways to work around that)

But honestly my motivation to find a solution is going down ....
What could be possible but might take a lot of testing is making checkpoints every tile. Event moves from one tile to another, adds to a variable and if the player leaves and comes back, the event will check the variable before moving. But that might make it more of a mess. I'd have to do some testing. I need similar mechanics for my game so once I finish tests ill bring back what I learn. Might take awhile though,
What could be possible but might take a lot of testing is making checkpoints every tile. Event moves from one tile to another, adds to a variable and if the player leaves and comes back, the event will check the variable before moving. But that might make it more of a mess. I'd have to do some testing. I need similar mechanics for my game so once I finish tests ill bring back what I learn. Might take awhile though,

It's okay, I've given up on it.
Me too... =)...sorry i was so confident at the beginning...
going towards checkpoint b VarX = 7
going towards home map VarX = 8
being in between rooms VarX = 9
When Player arving to next map VarX = 11 or 10A or 10B
arriving at Checkpoint a VarX = 11
arriving in Bed VarX = 12, resett to 0

What could be possible but might take a lot of testing is making checkpoints every tile. Event moves from one tile to another, adds to a variable and if the player leaves and comes back, the event will check the variable before moving

that is pretty much what I explained to her as a "handshake" method.
set a variable, trigger an action, and have that action alter that variable further, which returns control to the main sequence, which updates itself and continues the process.
instead of having the sequence constantly update itself regardless of outside interaction (as was the case with a timer), it takes outside events into account and waits for them to finish.
the problem with that sequence is that it only works for sequences that can be written as *sequences* (linear sequences) that don't rely on timed events, although they can be as lengthy as needed.
it won't work for real-time variations, and won't work (correctly) with a timed sequence.
Using switches will not work as the problem is that is that if the player is not present in the map when the switch is activated than it will never be activated. There is also a limited number of switches for use in the game and that is a hefty amount of switches to use for each NPC so its just not practical as you would have to have a unique switch for every room the NPC is in as well as for each given NPC. I dont believe there is a workaround that could be used for self-switches since the player would again have to be present for them to activate. There is a solution but it has some kinks that maybe could be ironed out with enough work.
There are some foundational requirements:
1. You will need to record real-time seconds if you want this system to have a high level of fluidity
2. You'll need to set up some sort of in-game clock that you can reference so that timing is accurate.
First, set an event where an NPC appears at a designated time and location - the starter location so to speak. When you want the NPC to move to a new room. Direct them to the destination entrance. Record exactly the time it took for them to reach the destination entrance. Use the in-game clock to reference their time that they got there.

After that, you really just set conditional variables on the NPC, if time=1350 than set event location for NPC to be in this or that location. If time = 1421 than NPC will appear here in this room.
There are bugs that will be present that such as if you were to block an NPC from moving than it will offset their time. The problem with this is that then if you were to move to that location before the NPC got there than the NPC will magically appear as if they teleported in the room. There are two ways to handle this. You could make the NPC event a "through event" so that the NPC will ghost through the player and prevent them from being obstructed. It probably will not look pretty but it would be the easiest solution to this very complex problem. In order to limit the silliness of having an NPC that clips through everything you could set a self switch that only triggers the through condition when the NPC is set to move to the next destination. As long as the NPC only clips through the player when he is travelling, I think this this would be feasible and playable. But if having NPCs that clip is just unacceptable than I have an untested option that would probably work but would require a lot of effort.

You would have to download a plugin to detect collision and set up a simple mathematical formula to add seconds equal to the seconds they were obstructed to the entrance time of the destination should the NPC event be obstructed, which would also necessitate that the entrance time is set as a conditional variable now. And probably a couple more variables as well per NPC. Also make sure to reset the variable to the original time once the current time exceeds the time offset time. Otherwise, it will just permanently remain the new time that that NPC will arrive at their destination. There is a collision checker plugin that I have not tried. I have not tested this method but the logic appears sound anyways. If someone can find another workaround for this than let me know.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-harvest-moon-like-npc-moving-from-one-place-to-another.104736/