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,770
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

I'm the king of idiots. How did I miss that in the contract, I would never have signed it if I knew, now I can say goodbye to my pay which will have dire consequences for so many things :(.
Person: "Taxes are bs and money is, too! Anarchy!!" *Literally anything goes wrong* Same Person: "Why hasn't the government fixed this???"
Stream will be live shortly with a session of Haunting Ground! Feel free to drop by!
As for the Coronavirus? Well: "People that spend their life avoiding death are already dead (they're also rich, and I like to spend my life with their money.)"
- R. Sanchez, "Edge of Tomorty: Rick, Die, Repeat"

Forum statistics

Threads
94,345
Messages
920,111
Members
124,107
Latest member
59412a
Top