Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Teleporting NPCs

I'm trying to figure out a way to move an NPC from one part of the map to another without player interaction. I can use custom movement in the event but there is no option to transfer the event. And I've tried a separate event controlling the movement but when the player talks to the NPC it just continues on its path without stopping for a chat.
If anyone can help I'll give you an official thumbs up!
 
It's to another location on the same map.
Basically instead of having an NPC walking in random patterns they have a pre defined path to follow. When they go indoors they transfer to another part of the map that looks like the interior.
So it all happens on one large map, not multiple maps.
I should have been more clear first time round, sorry.
 
if that's the case then in each event used for an npc you'll need a set move route to move the npc where you want and various pages in the event that have conditions through switches and variables to gain access to them. This allows the npc to move depending on the player's interaction with an npc.

does this make sense?
 
Yes... sort of.  But if the NPC is stopped by the player, meaning a switch to another page then a switch back, wont the move event start all over again? Or am I not reading it right?
 
Quite right! There is. The wall I'm coming up against however is stopping the movement when the player interacts with the NPC and then start  moving from the same place it stopped instead of restarting all over again.
 
There isn't any transfer event option in the Autonomous-Custom Movement selection, that I can see.
If there was then it would make this whole situation much easier! No switches or variables to mess around with!
Would it be possible to call a script to do it? Or am I asking in the wrong place?
 
You could always have another event in the same location change the NPC event's location... make it parallel process, and have it do something like, "Change Event location (Wizard to 8,14) Wait 1200 Change Event Location (Wizard to 24, 24) Wait 1200."  The thing that makes the event relocate doesn't have to be the event itself.
 
well technically  you can't transfer a npc. you could make another passable event where when one event touches another it switches the npc to be invisible aka 2nd page of the event of a npc.
 
Hmm... What you COULD do is in the set move route part, when you get where the NPC is going to change, have

Change Opacity: 0
Through: ON
Change Speed: 6-Highest
Jump (That is, jump to where they come out)
Change Speed: (Whatever it was)
Through: OFF
Change Opacity: 255

Of course, there will be some delay between the two locations but it seems the esaiest solution
 
Thanks for all your help guys!
I decided to go the scripting option because this was turning out to be more detailed then I would have liked. If you have 20 NPC's being transferred thats a lot of events, switches, variables etc.
Thanks all the same! 
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top