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,058
Reaction score
6,696
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

Can't wait for the next Sonichu
Birdhouses are usually made of wood. Birds typically live in trees. Trees are wood. Birdhouses are made of birdhouses.
He just discovered cellphones...

(I don't know why am I drawing so much these days...)
In medieval times, a common way to eat food was upon edible plates, which were made of bread, called trenchers.

Forum statistics

Threads
93,668
Messages
914,416
Members
123,254
Latest member
Ragnamano
Top