My Switches to get NPCs to disapepar when you leave the room isn't working

DjKniteX

Veteran
Veteran
Joined
Oct 18, 2013
Messages
30
Reaction score
6
First Language
English
Primarily Uses
RMMV
I set a general switch for the NPCs in a room and made a 2nd event page where it's empty. The first page for those npcs have the switches on.

Now I have it on my transfer (for when I leave the room) to turn the switches off but that doesn't seem to be working. After I talk to the NPCs they disappear and when I transfer out of the room they just come back.

What's an easier way for me to achieve this?

Attached are the screenshots
 

Attachments

  • snip1.PNG
    snip1.PNG
    144.2 KB · Views: 12
  • snip2.PNG
    snip2.PNG
    106.8 KB · Views: 11
  • snip3.PNG
    snip3.PNG
    101.7 KB · Views: 10

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,715
Reaction score
15,838
First Language
English
Primarily Uses
RMMV
Your description of what happens is consistent with how you've got the events set up.

When you talk to the NPC, you turn on the switch. This then activates the second page with that switch as a condition so they disappear straight away. Then when you leave the room you turn the switch off again, so the first page becomes active and they reappear.

If you want them to disappear when you leave the room, make the transfer event turn the switch on. Don't turn it on in the events themselves.

And unless you want them to reappear in this room at some point, leave the switch on.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,989
Reaction score
4,916
First Language
EN, FR
Primarily Uses
RMMZ
I don't understand what you are trying to achieve, but the behavior you are describing fits with the event pages you shown us.

-> The NPCs are there when the switch is OFF.
-> The NPCs disappear when the switch is ON.
-> When you talk to the NPC, it turns the switch ON, thus, making them disappear.
-> Exiting the room turns the switch OFF, thus, making the NPCs reappear when you re-enter the room.
 

DjKniteX

Veteran
Veteran
Joined
Oct 18, 2013
Messages
30
Reaction score
6
First Language
English
Primarily Uses
RMMV
Your description of what happens is consistent with how you've got the events set up.

When you talk to the NPC, you turn on the switch. This then activates the second page with that switch as a condition so they disappear straight away. Then when you leave the room you turn the switch off again, so the first page becomes active and they reappear.

If you want them to disappear when you leave the room, make the transfer event turn the switch on. Don't turn it on in the events themselves.

And unless you want them to reappear in this room at some point, leave the switch on.

I got it! Thanks, so pretty much I can do it this way for events later in the future? Like I can talk to one NPC in a random city and that can change how an NPC interact in a different city?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,715
Reaction score
15,838
First Language
English
Primarily Uses
RMMV
Just turn on a switch on the "trigger" event, and have another (later) page on the affected event that's conditioned by that switch.

When determining which page to make active, the engine starts from the highest number and works its way back to the lowest number. As soon as it finds a page that either has no conditions, or where all conditions have been met, it makes that the active page. So generally things that you want the event to do early in the game will be on the lower-numbered pages, and things you want it to do later in the game will be on the higher-numbered pages, as their conditions will be met later in the game.
 

DjKniteX

Veteran
Veteran
Joined
Oct 18, 2013
Messages
30
Reaction score
6
First Language
English
Primarily Uses
RMMV
Just turn on a switch on the "trigger" event, and have another (later) page on the affected event that's conditioned by that switch.

When determining which page to make active, the engine starts from the highest number and works its way back to the lowest number. As soon as it finds a page that either has no conditions, or where all conditions have been met, it makes that the active page. So generally things that you want the event to do early in the game will be on the lower-numbered pages, and things you want it to do later in the game will be on the higher-numbered pages, as their conditions will be met later in the game.

I got it to work with the NPCs disappearing when I leave the room but I tried moving the switch so when I enter the room they are gone but that is not working. Are switches only useable on the same map when called?

EDIT: Nevermind, I got it to work
 

Latest Threads

Latest Posts

Latest Profile Posts

Even if you made 1% progress today in your making-game, that's 100% success!
This is Ralph from VX!
index.php

Always be consistent with your project.
Making backups regularly is good for the soul.

Forum statistics

Threads
121,854
Messages
1,144,692
Members
160,110
Latest member
Zeisak1
Top