On page 2, are you sure you have to call the plugin command again to update the layer opacity?
Maybe you can just reduce the layer opacity through the variable, or using directly a script call:
$gameMap.layerSettings[mapId][layerId].opacity--;
And check if
Code:
$gameMap.layerSettings[mapId][layerId].opacity <= 0
break the loop
Wow, you speak like your a RPG Maker scientist, heh. I would love to know if there are college classes I can take to know as much about this as some of you guys do.
To answer your question, I have wondered that myself. That maybe there is some other more simple method to reduce the opacity. Honestly I am not very advanced with using RPG Maker and many of the events I use are from examples other people have given me or ones I have found in demo's. You gave an example of a script call and code above but I am not sure how to implement it, should I try just plugging it in and see if it works?'
'
Well, I see that you have 3 events page(3,4,5) removing the same layer.
Do you know for sure that these events are not playing again after you have already removed the layer?
Maybe you can put a conditional check for this, just to be safe.
It has a conditional branch to check if self switch A is on but in the original event, that I used as an example for this one, there was no actual tab/event that had the "self switch A" checked so I just assumed that it wasn't necessary to create a blank event page with it.
Could that be an issue?
So you are saying I should maybe change the "self switch A" condition to one using the script call " $gameMap.layerSettings[mapId][layerId]" right?
Thanks for your feedback, some of this is pretty far above my pay grade. I am going to fiddle around with what you have given me and see what happens.
Edit: On a side note I have noticed that when i zone from one map to another after the time change'switch flip from sunrise to day sometimes the sunray layer is still on the next map and then it starts to fade out immediately... I would think looking at the event that if I am NOT on that map during the time change that the sunray layer should be completely removed and should not fade out. It makes me think that the script is still maybe reading something when it shouldn't be. Maybe I should use a different variable (0004 is the default) for each map I have the sunray layer on?
Edit: Okay... I changed the conditional branch on events 3, 4, and 5 to use the script rather than self switch A and I haven't gotten the error again... yet. Lets cross our fingers, heh.