Yumi's Overlay Mapping only works for one Map

Hello,

I am working on a project where the player teleports to random almost identical rooms pretty often. I managed to setup Yumi's Overlay Mapping Script, so that the player disappears behind my walls... For the first map. But as soon as I enter the second, it doesnt work there.

The file names are all according. The Overlay Switch is also on by Default.

bandicam 2020-01-22 02-47-12-585.jpg

This is the first room, I do disappear behind these walls. The right door teleports me to a random room between Map 16 and 18, they all have a file in the Overlay Folder, but when I teleport there, there is no overlay.

bandicam 2020-01-22 02-49-07-154.jpg


This is the teleport command, I also set a few variables there.

bandicam 2020-01-22 02-51-20-996.jpg
bandicam 2020-01-22 02-52-03-179.jpg


Does someone have an idea, why the script only works on the first room? I also tried a few other scripts and it never worked there as well. So something has to be wrong in my setup.
First can you put a link to the script. Just to make sure we know exactly what script you are using.
second I would ask if all your overlay images are .png
the script says that parallax must be png.
Here is the script:

Script

I also have Yamis Basic Module
Please put a LINK to the script. Scripters generally don't like when you paste their scripts everywhere, because if they make a change, the old version is still floating around. Also, the thread or blog post where the script is introduced usually has more useful information about how to use it.

So please remove the script from your post and link to the thread or blog post instead (which will have the link to the actual script)

It's Yami, not Yumi
Oh yes, sorry.

The link is now in the old post

There is no website with useful informations, it is just a big folder with scripts in it

Unfortunately there are no further instructions there either 🙁

You've made THE most common mistake with Yami's script (and people still do it with the MV version). The script uses variables 1 and 2, and switches 1, 2, 3 and 4 by default. You have used variables 1 and 2 for something completely different. So as soon as you set variable 1 to 16, then transfer to that map, the script is not looking for a file called par16-1 anymore, but it's looking for par16-16.

Code:
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - 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

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Overlay Variables -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # A map can have more than one image per layer, that means you can have a
    # different light/shadow for day and night, or have a different ground when
    # an event occured.
    #--------------------------------------------------------------------------
    # Default: 1
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    LIGHT_VARIABLE = 2      # Switch to another light
    SHADOW_VARIABLE = 2     # Switch to another shadow
    PARALLAX_VARIABLE = 1   # Switch to another parallax
    GROUND_VARIABLE = 1     # Switch to another ground

The first thing you should do when you add a new script is to look and see if it uses variables or switches, and which ones. If you are already using them for something else, then you need to change the script to use others that are available. Then you need to go into an event and use Control Variables and Control Switches to give them names to make it clear they're being used by the script, so you don't accidentally use them for something else.
Ah, thank you very much! Sorry for bothering with this beginner-mistake. Now everything works like intended.
Moved to: RGSSx Script Support
If this has completely answered your query, please Report your post and ask for the thread to be closed.
Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/yumis-overlay-mapping-only-works-for-one-map.117498/