Event transparency when other events are behind it

So uhh, I did some searching but perhaps not enough. I'm looking for a script that will make events with other objects behind it become slightly transparent; For example, there is a wagon event (and let's assume this event has a charset that is quite large, maybe even 128*128. A very important quest-giving event (32*64) is set to walk randomly around the map, and ends up walking behind the enormous wagon event. Normally, this quest giving event would be absolutely invisible until it decides to walk away from the wagon. Attempting to talk to this NPC would normally be a hassle, and players would probably have to probe around to finally get a hold of them. What I would like this script to do is simply make the wagon event around 50% transparent when the other event is behind it (possibly when the player is behind it as well). I suppose I could do this using a player touch event for the player, but this doesn't work for event instances and it doesn't work between events.

I hope I was clear enough about what I'm trying to accomplish. If there's any way I can help you guys help me, I would love to know. Thank you so much in advance.
Do you want ALL events to be 50% transparent when ANY event is hidden by their sprite? Or only particular ones?


That kind of logic, where you're going to have every event check the location of every other event on every frame, is likely to slow your game down to a crawl, if it's not done in a clever way.


Do you NEED to allow your events to go behind other events? I wrote a large collision script (applicable for non-moving events) that would stop this behaviour.
Do you want ALL events to be 50% transparent when ANY event is hidden by their sprite? Or only particular ones?

That kind of logic, where you're going to have every event check the location of every other event on every frame, is likely to slow your game down to a crawl, if it's not done in a clever way.

Do you NEED to allow your events to go behind other events? I wrote a large collision script (applicable for non-moving events) that would stop this behaviour.
I mean, Events not going behind other events would really destroy my game, haha. Generally I'm working on a (Quite ambitious) Island survival game with crafting to the likes of "Survival Kids" but with the addition of being able to build wall segments and furniture just about anywhere to form your home. The catch is that at night/In certain "biomes", the really nasty animals come out, and if they spot you they'll try to bust down your walls in an effort to kill you. Now, the walls are around 32x64 (The bottom half is the wall, the Top half is the "ceiling", and the characters are mostly 32x32, which presents a problem really. If any of these enemies walk behind a wall, or you build some furniture behind your wall, they become completely invisible. I might just change the size of the walls to something like half, or even switch over to 32x32 as that might fit into my theme.

Anyways, I pretty much want the event to go slightly invisible only when enemies/the character is behind it. If you really think this can't be done efficiently, I can probably just switch over to the other back-up methods I explained earlier. Thanks! 😛

Original thread: https://forums.rpgmakerweb.com/threads/event-transparency-when-other-events-are-behind-it.35591/