Hi everyone, I noticed a curious function in the "Set Move Route" in the eventing: the "Move Toward Player" function. So I wanted to follow an NPC to the player I tried to insert that function but nothing happened. The NPC on which it was set did not move. How can I do?
Move Toward Player
RPG Maker XP SupportIt works, but probably not the way you think... "Move toward player" makes the event move one - and only one - step toward the player, just like "move down/left/right/up". If you want an event to properly follow the player, you must go to that event's page and either:
1) set movement type as "approach";
OR
2) set movement type as "custom", then add to the route "move toward player", check "repeat actions" (if it's unchecked), then set "frequency" to "highest".
I hope that helps! o/
1) set movement type as "approach";
OR
2) set movement type as "custom", then add to the route "move toward player", check "repeat actions" (if it's unchecked), then set "frequency" to "highest".
I hope that helps! o/
Hi and thanks for the reply, I have performed the second solution that you have proposed to me, but it continues not to take even one step.
Since I will also try the first solution, you can tell me what you meant by
"set movement type as" approach ""?
@Luca74Hej I have just tried both solutions and they're working fine:
Solution #1:
Set movement type as "approach" and frequency as "highest". This is the simplest but not the best solution because the event may also move away from the player as though it were confused (default path finding in RMXP isn't very efficient).
Solution #2:
Set movement type as "custom" and frequency as "highest", then click on "move route" and add to the route "move toward player" and check "repeat actions" if it's unchecked (it's a good idea to check "ignore if can't move" too so the event doesn't get stuck). This is the best solution because the event will move toward the player more efficiently than the previous solution.
I hope that helps! o/
EDIT:
My bad, I added "turn toward player" instead of "move toward player"... sorry, haha. That's an interesting effect though...
Solution #1:
Set movement type as "approach" and frequency as "highest". This is the simplest but not the best solution because the event may also move away from the player as though it were confused (default path finding in RMXP isn't very efficient).
Solution #2:
Set movement type as "custom" and frequency as "highest", then click on "move route" and add to the route "move toward player" and check "repeat actions" if it's unchecked (it's a good idea to check "ignore if can't move" too so the event doesn't get stuck). This is the best solution because the event will move toward the player more efficiently than the previous solution.
I hope that helps! o/
EDIT:
My bad, I added "turn toward player" instead of "move toward player"... sorry, haha. That's an interesting effect though...
Thanks! Now works! I have another thing to ask: is there a way for the NPC to continue following me even when I teleport to other maps?
You will have to make duplicate events on the maps you transfer too. Easiest way. I don't know of a way to have an event transfer maps. Plus the event would not stay there when you save and load.
mind you I don't know that much about xp, so best guess from my vx ace knowledge
Hi, what are duplicate events?
an event that is the same as the other
your "problem" is that there are no NPCs anywhere in your game, there are only events pretending to be NPCs.
That is a very important distinction as the event you have is never the real NPC, and one of its many limitations is that events can never leave the map that they are on.
But you don't need that event to leave the map, you just use a different event on the other map and have it pretend to be the same NPC as that one is pretending to be.
Thank you, I solved my problem!
Original thread: https://forums.rpgmakerweb.com/threads/move-toward-player.121348/