RPG Maker MZ

RPG Maker MZ

Transfer or Teleport not working
I have a FOG of war setup with a black transparent overlay image, a custom Fof of War. It is very basic and simply needs to be turned on or off by a series of switches and common events. I want to ensure the teleport maintains the correct fog of war status for each map.

The problem I have is as follows:
Give Choice Yes or No - DO you want to teleport back home?
When Yes
If switchIsPItchBlack = 1
FogOfWar = 1 ie is max level fog of war
else
FofOfWar = 0 ie is in semi transparent mode
end

If FogofWar = 1
restore the FOG of War
if FogofWar = 0
restore partial Fog Of War
Else
Hide FOG Of War

Common Event: Teleport
Fancy teleport animations
transfer PLayer

When No
Text: Ok

End

Im trying to restore the FOG of War after I teleport but for some reason nothing fires after the transfer unless it is on the same map. I need to go from anywhere in the game to the original starting position. Does anyone know or have an idea how to solve this? Please no plugins.
< >
Showing 1-5 of 5 comments
I could be completely wrong, but it sounds like you might need a Parallel Event on each map to run when the map loads to see how the fog of war should be placed. The event can turn itself off after it runs.
I re-arranged things as you said
if switchFogOfWAr = Off
If switchFogOfWarBlack = Off
then FOWEnabled = 0
If FOWEnable = 0
then erase picture #1 used for Fog of War.

It works before the transfer event if the changes are made on a map placed event. But when I call the process from a common event it doesn't seem to fire the Map Event with the above pseudo code. Is there a way to transport and ensure that the map global events are fired?
I don't think you can change anything on a map that isn't loaded. You can turn switches on and off for any Event on any map, but I don't think you can otherwise trigger anything until the map loads.

So again, I think you have to run the Event once you load the map that you transfer to. So the Event has to run after you transfer and arrive on the new map.

But I might be misunderstanding.
Ok Thanks. I managed to resolve the problem based on your advice.
I'm glad to here it. Good luck on your project!
< >
Showing 1-5 of 5 comments
Per page: 1530 50