Npc that follows you on map idea

I will say upfront at times I have a hard time communicating my thoughts so please just ask to clarify. Thank you.

I've made a npc character that follows you around on a big map. With no scripts whatsoever, just using the "follow player" around. But he won't follow you inside a cave, etc. So the problem is when you exit he needs a place to be found each time you enter and exit the area. I've been using switches and using fireplaces as designated places to get back to him as you explore farther on the map. So when you enter and exit he will be found sitting by the nearest fireplace depending on where you are located on the map. And when you talk to him again he will follow you around.

My problem is if I have multiple copy events of the character where switches turn on and off to hide him or show him all over the map, what is the easiest way to do this?

So far I have used switches but that just seems redundant. Would a parallel condition branch work better or something like if player is at this location, turn on this event at the fireplace?

I was thinking if I set variables that would be +1 on the ground when the player walks over the event to determine a specific area. So if the player walks into the forest, when he touched the tile surrounding the forest it would be"Variable is set 1" and when player enters the beach area the variable is set to 2? And depending on the variable will show or hide the npc by the fireplace nearest the player?

I'm sorry if this doesn't make sense. It seemed like a good idea at first but it seems complicated.
Try making the NPC an additional actor instead. In order to do this, follow these steps:
  1. Enable "Show Player Followers" in the System tab of the Database.
  2. Create an additional actor.
  3. Set the actor's traits to "Seal Equip" every slot.
  4. At each event that summons this NPC, make said event "Change Party Member" -> The NPC -> Add.
  5. At each event that leaves the map, make the event "Change Party Member" -> The NPC -> Remove.
  6. At each event that starts a battle, remove the NPC from the party before the battle. After the battle, add the NPC back again.
  7. If your battle system uses random encounters instead, make each encounter possible in the map begin by removing the NPC and end by adding it back again.
Alternatively, you could use a variable system where each variable represents a different point at which the NPC exists. Each of these points should use a conditional branch where the variable has to equal a specific value. If said value is met, the NPC appears there; if not, the NPC doesn't appear.
better solution than multiple events would be to use one of the plugins that let's you save an event position - perhaps Shaz' remember event position plugin, or yanfly's variant

Original thread: https://forums.rpgmakerweb.com/threads/npc-that-follows-you-on-map-idea.79176/