Events/Switches Question

Hello! I'm new to RMVX Ace, so I'm having a bit of difficulty with a certain problem.

So I have a question about events..or, at least I think it's about events.

I want the player to not be able to leave the house before doing something/talking to a person, but I don't know how to do it. For example, in the beginning, they can leave the house freely, without talking to the character before going. I want to prevent them from doing that. Is there a way where I can make sure they can't go anywhere or leave the house until they talk to the character, and then they go can out? Thanks. ^^; 
This is a simple case of switches. You should read up on some beginner tutorials, and look at the help file.


On your exit event, have two pages. On the first page, use Show Text to tell the player they need to talk to the person. On the second page, put the transfer command. Condition the second page by a switch.


On the NPC event, turn on the switch.


If the player tries to leave without talking to the person, the switch will be off and the first page of the exit event will be active. They'll be given the instruction to talk to the person.


When they talk to the person (whether they've tried to exit or not), the switch will be turned on and the second page of the exit event will be active, allowing them to leave.

Original thread: https://forums.rpgmakerweb.com/threads/events-switches-question.37612/