Help with Making NPCs follow each other

DokuHime

Warper
Member
Joined
Dec 1, 2015
Messages
4
Reaction score
1
First Language
English
Primarily Uses
N/A
HI, i hope i posted this in the right place

I need help with making an npc follow another npc, is it possible? I tried looking it up but i only get information on how to make an npc follow the player or make the player follow an npc but that's not what i'm looking for since i know how to do that. I don't mean during a common event, i mean like a pet dog npc following it's owner npc around in a town and i can run around and talk to them and stuff. sorry if the info is not clear, am not good at explaining.

Thanks in advance!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,230
Reaction score
6,776
First Language
German
Primarily Uses
RMMV
you need to have one controlling event for both the NPC and the dog.
that event needs to give the move commands to both - and since it knows what command it gave the NPC it can give the fitting command to the dog.
 

DokuHime

Warper
Member
Joined
Dec 1, 2015
Messages
4
Reaction score
1
First Language
English
Primarily Uses
N/A
you need to have one controlling event for both the NPC and the dog.
that event needs to give the move commands to both - and since it knows what command it gave the NPC it can give the fitting command to the dog.
Sorry i didn't explain good enough >.< I can set a move path for them both but i want the owner to be set to random movement and have the dog follow, kinda like the 'move toward player' option but following the owner instead. If it's not possible i will do as you said
 

mishakoc

Professional Procrastinator
Veteran
Joined
Jan 1, 2019
Messages
115
Reaction score
779
First Language
Czech
Primarily Uses
RMMV
If you don't mind using plugins, try Yanfly's Move Route Core, there's a command MOVE TO: EVENT x. The plugin does much more than that so it will probably be quite useful anyway.
 

DokuHime

Warper
Member
Joined
Dec 1, 2015
Messages
4
Reaction score
1
First Language
English
Primarily Uses
N/A
If you don't mind using plugins, try Yanfly's Move Route Core, there's a command MOVE TO: EVENT x. The plugin does much more than that so it will probably be quite useful anyway.
Sorry i think that's only for RPG Maker MV, thanks for the suggestion though
 

mishakoc

Professional Procrastinator
Veteran
Joined
Jan 1, 2019
Messages
115
Reaction score
779
First Language
Czech
Primarily Uses
RMMV
Oh, sorry, I really need to look at which part of the forum I am in. Have you tried a pathfinding method combined with getting the NPC guy's coordinates?

edit: Just tried it myself and it works fine, you don't even have to get the NPC's coordinates using this script.
Put this script call inside the dog's custom movement route: PathFinder.dyn_find(dogID, $game_map.events[npcID])
dogID being the number of the dog event, npcID the number of the NPC event
 
Last edited:

DokuHime

Warper
Member
Joined
Dec 1, 2015
Messages
4
Reaction score
1
First Language
English
Primarily Uses
N/A
Oh, sorry, I really need to look at which part of the forum I am in. Have you tried a pathfinding method combined with getting the NPC guy's coordinates?

edit: Just tried it myself and it works fine, you don't even have to get the NPC's coordinates using this script.
Put this script call inside the dog's custom movement route: PathFinder.dyn_find(dogID, $game_map.events[npcID])
dogID being the number of the dog event, npcID the number of the NPC event
Thank you both! i will try these suggestions right now :)

Edit: They work perfectly! just what i wanted! thank you sooo much to you both!
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

my profile has gotten so inaccurate.
I wrote this years ago, only now I posted an english version. How about we talk about procrastination?
I just noticed the minigame challenge. Now considering...
My project just started lagging during battletest and I haven't been able to figure out why...

Forum statistics

Threads
94,472
Messages
921,171
Members
124,311
Latest member
cadenm1223
Top