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,186
Reaction score
6,758
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

That moment when you post the wrong download link to your game and wonder why it got so few downloads... :mad:
Trying to make it so my map is cleared of "random" events after the player leaves the map... to little success >.<
Had my first interaction with a legit homophobe concerning one of my games today. Tempting to engage, but pointless.
The BIGGEST immersion breaker for Sword Art Online is that Kirito keeps finding overpowered playstyles using "bad things nobody uses cuz its bad". Players WILL use bad gear BECAUSE it's bad.
When I said I'd make 20 games in 2020, I scared myself. Now it's mid-February, and I've made 6 games. So I got this. But, then again...do I got this?

Forum statistics

Threads
94,239
Messages
919,301
Members
123,946
Latest member
AstemirShaov
Top