I have been pondering this idea for a while and can't quite figure out a way to execute it.
The idea being npcs moving to different locations while the player is in another map. (good for harvest moon style games)
I can get npcs to save there locations when the player changes maps and goes back, but I need help figuring out how to get the npcs to change positions while the player is in another map.
Anybody have any ideas?
could create some updater module that stores & updates a set of variables, then when you re-enter a map, it sets the event to the variable stored within the updater. 🙂
Normally the engine will never process events outside the current map the player is in, but what you can do is either 1) save the event NPC location and have it spawn + resume from there when the map is entered again, or 2) make the event NPC randomly spawn in a specific area when re-entered. Having it in real-time is, I believe, impossible for the engine.
Some advanced AAA game engines have the ability close enough to real-time, where based on elapsed time between two different maps, event NPCs will spawn at certain distances from where you last left them when you left the map. For example if I left the map for 5 seconds and re-entered, an NPC would move 5 feet away. If I left and re-entered 15 seconds later, they would move 15 feet instead.
or make 1 giant insanely big map 🤣
You can use my Remember Event Position script. You can call it directly with the map and event id, and the location you want the event to be at. Next time you go to that map, the event will be at that location.