How do I make an npc walk over and talk to the player whille walk over events?

timelordzac

Warper
Member
Joined
May 22, 2021
Messages
1
Reaction score
0
First Language
english
Primarily Uses
Other
This idea of what I'm trying to do can be seen below. What I want is for several blank events that when touched by the player will make an npc approach the player and talk to them. But I've discovered that an npc cannot walk over an event unless labeled THROUGH. But unfortunately this causes the npc to walk over the player and share the same tile with them. I've been working on this for three hours and I'm losing my mind. Please help. I am using RPG Maker MV.**** up 2.PNG
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,706
Reaction score
15,298
First Language
English
Primarily Uses
RMMV

I've moved this thread to MV Support. Thank you.



You could do a Set Event Location to move all the other events out of the way, before moving the NPC.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,231
Reaction score
1,196
First Language
English
Primarily Uses
RMMV
I'm a bit confused - if your event tiles are triggering the NPC to approach...why is it then walking over the player? You should know where the player is and therefore be able to stop short.

It seems like you have the correct solution, turning Through ON in the move route, but just don't program the move route to move into the player's space.

And what Shaz said is totally correct and will help, I just don't get why it's necessary :stickytongue:
 

uglywolf

Veteran
Veteran
Joined
Nov 9, 2015
Messages
60
Reaction score
71
First Language
Malay
Primarily Uses
RMMV
As Shaz said, you can "move" the non-graphic event before executing NPC move to PC.
Its simply making a switch or variable for them as conditions, and move them up(or down), or you can just remove them from map entirely; like making another page with empty script and set them as through or different layer.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,706
Reaction score
15,298
First Language
English
Primarily Uses
RMMV
I'm a bit confused - if your event tiles are triggering the NPC to approach...why is it then walking over the player? You should know where the player is and therefore be able to stop short.
As the player can trigger the interaction from any of those tiles, you can't tell beforehand exactly where the player is standing, so you can't tell how many steps the NPC needs to take. If you turn THROUGH on on the NPC or the other events, then use an "approach player" or "move towards player" move route, the NPC will end up standing on the same tile as the player.

An alternative would be to put a loop which will check if the NPC is one tile away from the player and break the loop, otherwise take a single step towards the player. I was going to suggest that, then came up with the other idea, which is probably easier.


like making another page with empty script and set them as through or different layer.

This will not work, because events will not walk over other events, even if they have a different priority, unless THROUGH is on, on one of the events. Even if there is no sprite. But the OP has already discovered that.

And someone discovered a little while ago that even if you use Erase Event to get rid of the event from the map, its position is still saved, so the NPC event would still not be able to walk on the tile where the erased event used to be.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
970
Reaction score
432
First Language
english
Primarily Uses
RMMV
As the player can trigger the interaction from any of those tiles, you can't tell beforehand exactly where the player is standing, so you can't tell how many steps the NPC needs to take.
but each of those tiles is a different event. that argument only works if using event hitbox plugins.
since all of them are different events you just have each event move the npc a different number of spaces.
 

C64_Mat

System Masters
Veteran
Joined
Apr 3, 2021
Messages
75
Reaction score
36
First Language
English
Primarily Uses
RMMV
I'll add my confusion to this one!

The easiest solution is if the NPC is otherwise static, and not roaming around. If this IS the case, then the solution is easy!

You've copied the "trigger" event into several places, right? You just need to slightly adjust the NPC path on each event. If it's moving over the player, just remove one of the movement instructions.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,706
Reaction score
15,298
First Language
English
Primarily Uses
RMMV
but each of those tiles is a different event. that argument only works if using event hitbox plugins.
since all of them are different events you just have each event move the npc a different number of spaces.

Oh that's interesting ... yes, if you were to modify each event to make the NPC walk the required number of tiles, you know exactly how many they need to cross.

I was thinking of each event being exactly the same. Set one up, then copy/paste without any changes.

You're spot on.
 

uglywolf

Veteran
Veteran
Joined
Nov 9, 2015
Messages
60
Reaction score
71
First Language
Malay
Primarily Uses
RMMV
I've made a recreation of your map without the use of plugin.
Feel free to check and see if it works for you.

>> USA upload << About 100m

You don't actually need to make NPC talk to PC while being suffocated by invisible things.

This one uses the method that I formerly mention, in case, if you wished to have the NPC approach you non-scripted.
Yes, you should be able to return the EVENT(s) back to where it was by setting up another event by chained-switch/variable.

Also, please suggest me via PM a place to upload example works that people mostly uses on this forum.
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,231
Reaction score
1,196
First Language
English
Primarily Uses
RMMV
As the player can trigger the interaction from any of those tiles, you can't tell beforehand exactly where the player is standing, so you can't tell how many steps the NPC needs to take.

but each of those tiles is a different event. that argument only works if using event hitbox plugins.
since all of them are different events you just have each event move the npc a different number of spaces.
That was exactly what I meant...it never even occurred to me that you'd have events causing movement that were in different places and doing the same move route.
 

Latest Threads

Latest Profile Posts

I just don't know why, but it's funny.
5.gif
Ugh. The one time I forget to save every hour or so is also the day my computer crashes. That's life!
Even though I spent 100's of dollars on my game already. I think I might just have to give it away for free. Since I haven't heard back from people if I could use some of their graphics. Even from a global mod here. Maybe I can make a donation thing.
you know, some days you get resentful that game dev is even considered a "fun job" and other days it's like, welp, time to roll up my sleeves and code these molotov cocktails
If you suck at playing trumpets, that is probably why.

Forum statistics

Threads
115,964
Messages
1,094,434
Members
151,234
Latest member
sousou123232
Top