arcadekitten

Villager
Member
Joined
Feb 9, 2021
Messages
27
Reaction score
6
First Language
English
Primarily Uses
RMMV
Hi everyone! I feel like there's got to be some sort of simple solution to this, but I'm losing my mind trying to figure it out! @__@ I can't figure out how to open a door and reveal an NPC behind it. One that can exit from inside the door's space and then walk onto the rest of the map for the cutscene.

So, for example, in one of my current projects, the player character needs to walk into an elevator. When they approach the elevator and attempt to step inside, they're stopped by an NPC who was already using the elevator. The NPC talks for a few lines while inside the elevator, and then steps out as the cutscene continues. I tried to draw out a quick example to show what I'm getting at, too.

forum-npc behind door 1.pngforum-npc behind door 2.pngforum-npc behind door 3.png

But trying to accomplish this effect is proving...rather difficult. I'm not sure how to go about it! I know how the "door" event works and how to animate the door to look like it's opening and closing, but I don't know how to fit the NPC between the door and its space on the wall.

I considered simply adding the NPC into the "door opening" sprites as a band-aid solution, but that won't work for when the NPC needs to actually exit the elevator/doorway. On top of that, if I'm doing a similar event for multiple NPCs, it'll be annoying to have to edit all their sprites into that same animation, not to mention how tedious it'll be to fix if I go for a style change later on.

I also considered the "change image" effect during the "set movement route" of the door opening, but that wouldn't work either. Doing that would just make the NPC suddenly appear once the door's finished opening, rather than make it look like the door opens and reveals the NPC behind it simultaneously.

The only thing I've thought might possibly work is by having the NPC remain transparent a tile above the door event, and then when the door event is activated, the NPC moves down a tile and their transparency is turned off. (See image below)But that isn't working either.
forum-npc behind door 4.png

Either the NPC event stays transparent throughout the interaction, or it's visible the entire time, resulting in the below pic. Even when it's visible, it doesn't move, even when the event is set to "through" so that nothing can block it.
forum-npc behind door 5.png

As far as I am aware, you can't have two events on one space, so I can't simply layer the door and the NPC snugly on top of one another on the same tile. On top of that, (as you can see in the examples above) my character sprites and the door are both 2 tiles high--if i were to make the door any bigger to cover the NPC sprite, it'd look monstrously big on the wall! I tried looking up how to do this before but I couldn't really find an answer. It was either about to make NPCs walk into doors and then turn transparent, tutorials on how to make NPCs move in general, or just confusing broken links. I don't know if something like this is possible, but cutscenes like this are really vital to this project so I'd really like to figure out how to do it! I also use MV and am not opposed to plugins if they can help with something like this. Thank you in advance for any help you are able to provide!
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,954
Reaction score
11,895
First Language
German
Primarily Uses
RMMV
The only thing I've thought might possibly work is by having the NPC remain transparent a tile above the door event, and then when the door event is activated, the NPC moves down a tile and their transparency is turned off. (See image below)But that isn't working either.
that is the way you need to go.
but for one event to pass through another, one of those has to be set for through ON.
that however disables touch triggers, so it's best to do this by moveroute command for that step only.
 

arcadekitten

Villager
Member
Joined
Feb 9, 2021
Messages
27
Reaction score
6
First Language
English
Primarily Uses
RMMV
Simple - just before opening doors use "set event location" event ( https://prnt.sc/zvf2zi ) and place it in same position as doors.
Yesssss thank you!! I knew I had to be missing something obvious! For whatever reason, I just couldn't figure it out--so thank you! I am having difficulty getting the NPC to leave the elevator now though whenever I try to make them move... All the text appears as it should, and the player character can move fine, but the NPC is still stuck in place unfortunately. But thank you for helping show me how to get them to appear behind the door!
 

arcadekitten

Villager
Member
Joined
Feb 9, 2021
Messages
27
Reaction score
6
First Language
English
Primarily Uses
RMMV
that is the way you need to go.
but for one event to pass through another, one of those has to be set for through ON.
that however disables touch triggers, so it's best to do this by moveroute command for that step only.
Thank you! I'm still having a bit of trouble, though... When the door opens, it has "Through ON" set at the end of its movement route. The NPC however can't seem to move out of the spot it's in, regardless of whether or not I set a movement route with "Through ON" for the NPC. It either moves to the next line of text without moving the NPC when I set "Through ON", or it just freezes the cutscene when "Through ON" isn't there, even if the player character has been moved out of the way! I'm not really sure what I'm doing wrong...(Edited because I hit "post reply" by accident. Oopsie!)
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,954
Reaction score
11,895
First Language
German
Primarily Uses
RMMV
show us a screenshot of your event pages if you want to have better help.
it sounds as if you're doing something wrong because it should work if the NPC is set to through
 

arcadekitten

Villager
Member
Joined
Feb 9, 2021
Messages
27
Reaction score
6
First Language
English
Primarily Uses
RMMV
show us a screenshot of your event pages if you want to have better help.
it sounds as if you're doing something wrong because it should work if the NPC is set to through
elevator event screenshot.png

This is my event right now. It's not very long as I wanted to test it worked before going ahead. The Player character is able to move those two steps backwards, but the NPC doesn't move anywhere. The rest of the event plays out, but the NPC doesn't move at all, as if I never set a movement route for them! If I take "Through ON" out of the NPC's movement route, then the event just freezes after the Player takes those two steps back. I'm not really sure what's going wrong...
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,954
Reaction score
11,895
First Language
German
Primarily Uses
RMMV
and where is the NPC intro event?
This shows neither that event, nor the command to teleport it to whatever position is needed.
 

arcadekitten

Villager
Member
Joined
Feb 9, 2021
Messages
27
Reaction score
6
First Language
English
Primarily Uses
RMMV
and where is the NPC intro event?
This shows neither that event, nor the command to teleport it to whatever position is needed.
NPC intro is on the map in this position,
forum-npc behind door 4.png
now with a "Set Event Location" to appear on the same tile as where the Door/Elevator Event is. When the doors open, the NPC is now standing in that open doorway, which is intended. The NPC then needs to move out of the doorway by walking down into the rest of the map. I am using "Set Movement Route" for the NPC in the event pages of the Door/Elevator Event because the character needs to try walking into the Door/Elevator for this to happen to begin with. However, the NPC does not move even when there is nothing in front of them and when "through" is on in their movement route.

Apologies if this wasn't what you were looking for, I am having trouble understanding what you meant by your comment. I am still fairly new to RPG Maker. : (
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,954
Reaction score
11,895
First Language
German
Primarily Uses
RMMV
no, that is not what I was asking for.
I was asking for the event pages of the NPC event, and whatever event contains the set event location command.

if the commands in your event from the screenshot in the posts above don't work, then there is something wrong with either the positioning command or the event itself, and we need to see the event, not the map with the event position, to check on it.
 

arcadekitten

Villager
Member
Joined
Feb 9, 2021
Messages
27
Reaction score
6
First Language
English
Primarily Uses
RMMV
no, that is not what I was asking for.
I was asking for the event pages of the NPC event, and whatever event contains the set event location command.

if the commands in your event from the screenshot in the posts above don't work, then there is something wrong with either the positioning command or the event itself, and we need to see the event, not the map with the event position, to check on it.
Oh, wait, so like this?

npc intro event screenshot.png

This is all I have for the NPC event. If I place the "Set Event Location" in a different, separate event, it doesn't change the problem either.
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,954
Reaction score
11,895
First Language
German
Primarily Uses
RMMV
yes, that is the cause of your problem.

parallel events loop, which means that event is set to that location eternally, sixty times per second.
your move command in the other event works fine, you just don't see it because this event resets itself to the original position again and again.

and in the position you have, you don't even need that set event location -you only need that if you want to have two events at the same position on map entry. But with those two positions you can simply add another move down after the door opens.
 

arcadekitten

Villager
Member
Joined
Feb 9, 2021
Messages
27
Reaction score
6
First Language
English
Primarily Uses
RMMV
yes, that is the cause of your problem.

parallel events loop, which means that event is set to that location eternally, sixty times per second.
your move command in the other event works fine, you just don't see it because this event resets itself to the original position again and again.

and in the position you have, you don't even need that set event location -you only need that if you want to have two events at the same position on map entry. But with those two positions you can simply add another move down after the door opens.
Wait, what? But I'm pretty sure that was the problem I was having before. I needed the Set Event Location because I needed the NPC on the same tile the Door is on, or else the NPC just appears above the door.
--
Alright, I tried going back into the system and was able to make it work by having the transparency set in the NPCs Custom Route under Autonomous Movement. Then I was able to turn it off in the Door Event just fine, and they can move out now! Thank you for your clarification, this really helped me! I was confused because I was trying to have Set Event Location work with it, but I see now I didn't need it for this specific event. Thank you again!
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,954
Reaction score
11,895
First Language
German
Primarily Uses
RMMV
I needed the Set Event Location because I needed the NPC on the same tile the Door is on
for that you need the set event location ONCE - not sixty times per second for tens of thousands of times.
if you want to prevent that, you need to stop the event from looping as I described above.
 

Latest Threads

Latest Posts

Latest Profile Posts

Twitch! We're at it live with some game development! Feel free to drop by!
Deffo need to do a twofer for the advent compilation tomorrow. I saw the Nutcracker downtown and now I am full of tequila. You know. As you do.
After a long hiatus, I return to these parts, and the RPG Maker in me rekindled!
49 weeks into my project and I have hit 1,000 hours in the editor. (Plus maybe 500 hours in Pixelorama.)playtime.png
Just made a massive breakthrough in an MV -> MZ plugin conversion for my jam game! Gonna have a feature MZ games have basically never had. :D

Forum statistics

Threads
136,901
Messages
1,271,254
Members
180,684
Latest member
brengh
Top