Issues regarding Yami Overlay mapping & Events

Hello good people of the RPGM community. I have tried searching high & low to solve this problem of mine but to no avail & I'm sorry if this may have been asked somewhere else but I couldn't find it.

The problem:

So far I've only used 3 custom scripts. Yami's basic module, Yami's Overlay mapping & a Parallax lock script. I've completed the map that I plan on using & all the overlays the ground pieces are all working fine. When I come to making events though, is when the problem occurs. I was trying to make a basic quest of finding an item for a NPC, using basic commands line like "text, choices & control switch". When I finished writing out all the dialouge & what not - I go into the game and when I try to talk to the NPC it jumps straight to the second event page, completely skipping the whole dialouge and choices of the first event page. I've deleted each of the custom scripts and narrowed it down to Yami's Overlay mapping script to be the culprit, because when I delete that the event will play out properly.. but I won't have my overlay parallax. So my question is: Is there a way around this that anybody knows of? Or is it something super simple that I'm missing? There must be some way to be able to use the Overlay mapping with normal functioning events! Any help will be greatly appreciated. I'll attach pics of the event pages so you all can have a look yourselves.

issue pic 1.png

issue pic 2.png
If it's skipping straight to the second event page, it means switch 1 is already turned on. You can verify this by going into the debug screen (F9) before talking to the NPC.


You are either playing from a saved game where that switch has already been turned on, or you have something else turning the switch on (this could include one of the scripts). Make sure any scripts that allow customization and let you indicate a switch to use for something, do not use the same switches that you're using for your events.
Thanks for the reply Shaz!

I changed the original control switch (0001: spoke to woodsman) to the 0005 slot and evey spot from 0005 up seems to works fine. I don't really understand why this is the case, but I'm still very new to the whole RPG maker stuff so it's probably something a lot simpler than I'm making it out to be. If it's only the first 4 control switches that are causing this then it's no problem I should be in the clear! Again, thanks for the reply - this was making my head ready to explode.
 
So is it fixed? You still really should figure out what's using those switches, and name them accordingly, so you don't use them again. If it's a script, and you have several scripts that use switches, there could be some using the same switches, which would also be bad.
So far so good for now!

Yes, I believed I figured out what was using those first 4 switches. I checked through Yami's Overlay script & found this:

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Overlay Switches -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # These are switches which are enable overlay layers. Turn them on to show
    # them in your maps.
    #--------------------------------------------------------------------------
    # Default: ON
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    LIGHT_SWITCH = 1        # Turn on/off light layer
    SHADOW_SWITCH = 2       # Turn on/off shadow layer
    PARALLAX_SWITCH = 3     # Turn on/off parallax layer
    GROUND_SWITCH = 4       # Turn on/off ground layer

I'm assuming this is the reason as to why the first 4 switches don't work right & everything being from 0005: up does.
I still don't know for sure, but it'd make sense lol.
Yes. Now you should go in and give your switches those names, so you don't forget later and accidentally use them again. Might pay to go through all your other scripts as well and see if any of them 'claim' switches or variables.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/issues-regarding-yami-overlay-mapping-events.16811/