Posts: 15
Threads: 4
Joined: Jun 2015
So in my current project, I have a barrier in front of an archway that I do not want to vanish until you are done talking to the introductory NPC. Then I want it to vanish and the character is free to walk through the arch way.
My issue is, with the code I have currently, the moment the character enters the room, the barrier vanishes, never to return. There is no barrier, the talking to the NPC does nothing.
Here is my code, currently...
NPC's Code
Barrier's Code Pg.1
Barrier's Code Pg.2
Said an envious, erudite ermine,
"There's one thing I cannot determine:
When a girl wears my coat,
She's a person of note.
When I wear it, I'm called only vermin."
Posts: 11,205
Threads: 648
Joined: May 2009
It is a little known fact that map events in RPGMaker XP do not always automatically refresh upon command if the action asking the event to refresh is being performed by ANOTHER event.
In other words, if you asked ONE event to refresh, it will. If you ask ONE Event to do something, the other event may not immediately refresh. This isn't always the case, but a sometimes factor (including here). Smaller codes... no issues.
There IS a way to solve this (actually a few, but I'm not gonna talk rewriting the switches section now):
Add the following 'script call' right after you turn your switch on:
$game_map.need_refresh = true
This will force the game map to refresh, and re-check every visible event.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 15
Threads: 4
Joined: Jun 2015
(08-14-2015, 04:21 AM)DerVVulfman Wrote: It is a little known fact that map events in RPGMaker XP do not always automatically refresh upon command if the action asking the event to refresh is being performed by ANOTHER event.
In other words, if you asked ONE event to refresh, it will. If you ask ONE Event to do something, the other event may not immediately refresh. This isn't always the case, but a sometimes factor (including here). Smaller codes... no issues.
There IS a way to solve this (actually a few, but I'm not gonna talk rewriting the switches section now):
Add the following 'script call' right after you turn your switch on:
$game_map.need_refresh = true
This will force the game map to refresh, and re-check every visible event.
It's still vanishing. Do I put that script after every switch, or just the door lock switch?
Said an envious, erudite ermine,
"There's one thing I cannot determine:
When a girl wears my coat,
She's a person of note.
When I wear it, I'm called only vermin."
Posts: 11,205
Threads: 648
Joined: May 2009
Oh, I am sorry. I thought you had an issue where your barrier did NOT vanish. So what's happening is that your switch is being triggered when you enter the map, or was already triggered prior to entering.
Inquiries:
You're showing a self-switch activated page for your dialog. The first page... is it an auto-run or parallel process event. And if so, did you check to see if the code for the barrier switch (0009: Door Lock) may be there?
Maybe you are accidentally using Switch 0009 elsewhere in the game or in some custom script (it happens), and it is being turned on automatically. Have you tried using a different switch for your door lock?
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links