r/RPGMaker • u/Zoe_The_Trap • 2h ago
RMMZ Event Help
Okay, so I'm running into an issue that I'm not quite sure how to fix.
I have multiple different areas in my game, and I want certain NPCs to remember their previous encounters with the player.
For example, in Area 1, I want an NPC to meet and introduce themselves to the player for the first time. Then, during their second encounter in Area 2, I want the NPC's dialogue to change so that they recognize the player and greet them by name.
How would I go about setting something like this up? If someone could also explain how to set it up within the events themselves, that would be much appreciated.
As always, I appreciate all the help!
1
u/Eredrick MZ Dev 2h ago
When you first meet the NPC have them end the event by turning on a switch
◆Control Switches:#0001 metNPC = ON
On the second encounter, have a conditional branch, under flow control, on page 1 of the event commands, to check whether or not that switch is on
◆If:metNPC is ON
◆Text:None, None, Window, Bottom
: :Hello again
◆
:Else
◆Text:None, None, Window, Bottom
: :I never met you before
◆
:End