could you please send me the two fog images you're using? I'll see if I can reproduce the issue at my end. Just pop them up onto dropbox or something and PM me a link.
Multi Layer Fog
RGSS3 Scripts (RMVX Ace)Sorry! This was an error completely on my end. For whatever reason, my PlayerInit event wasn't drawing the 2nd fog correctly, using blend mode 1 instead of 2. So, whenever I went into a menu and exited, it would redraw it properly, causing the issue seen above. Changed fog 2 to blend mode 1, error went away. I'm sorry for likely confusing the hell out of you! Also posting this in case someone has an issue like this in the future.
Thanks again for the wonderful script, Shaz, and your prompt responses! 🙂
Thanks again for the wonderful script, Shaz, and your prompt responses! 🙂
awesome! Glad you got it working on your own - that's always a nice (though sometimes frustrating) feeling 🙂
Shaz this is simply beautiful! Thank you so much!
After wandering while looking for a Fog Script that doesn't loop, I decided to look up yours after all.
show_fog(1, "Fog01", 0, 255, 1, 100, 5, 5)
Anyway, when I tried to load a save file, this happens. I tried to browse through the previous posts, but there are so many script updates that I don't know what to use.

And this is what happens when I go to the fog event while loading a new game.

show_fog(1, "Fog01", 0, 255, 1, 100, 5, 5)
Anyway, when I tried to load a save file, this happens. I tried to browse through the previous posts, but there are so many script updates that I don't know what to use.

And this is what happens when I go to the fog event while loading a new game.

The first error is because you added the script then loaded a game that was saved prior to adding the script. This is common when you add new scripts and try to play a game that was saved earlier. The solution is to not expect to be able to load saved games after adding new scripts - start a new game.
The second error is because you've done something wrong in the script call. You've done a script call and passed in 8 arguments, and none were required. Please show a screenshot of the event.
Edit - I suspect your script call might be okay, but that you've still got another fog script in there somewhere, and that's picking up the call, rather than my script. Make sure you clean up your project properly when you decide not to use a script - remove the script completely, as well as any calls to the script from any event. Do a global search in your scripts (control + shift + f) for show_fog and see what other scripts come up, apart from mine. It could even be in an unnamed script slot.
The second error is because you've done something wrong in the script call. You've done a script call and passed in 8 arguments, and none were required. Please show a screenshot of the event.
Edit - I suspect your script call might be okay, but that you've still got another fog script in there somewhere, and that's picking up the call, rather than my script. Make sure you clean up your project properly when you decide not to use a script - remove the script completely, as well as any calls to the script from any event. Do a global search in your scripts (control + shift + f) for show_fog and see what other scripts come up, apart from mine. It could even be in an unnamed script slot.
It's an incomplete call. Add another number at the end. Preferably like 800 or so.
No, it's fine. Most of the arguments default - it's only the first few that are necessary.
If you look at the error, it's saying the method received 8 arguments but expected none. That means there is another show_fog command in Game_Interpreter that expects no arguments. @SakuraMiya did you do a search in the scripts like I asked? What did you come up with? I am almost certain you have not cleaned up your other unused scripts, which means you probably have THREE fog scripts in there now.
Also, add an Erase Event after the show_fog call. It's something you need to happen once, on loading the map, not every frame, which will cause your game to lag.
If you look at the error, it's saying the method received 8 arguments but expected none. That means there is another show_fog command in Game_Interpreter that expects no arguments. @SakuraMiya did you do a search in the scripts like I asked? What did you come up with? I am almost certain you have not cleaned up your other unused scripts, which means you probably have THREE fog scripts in there now.
Also, add an Erase Event after the show_fog call. It's something you need to happen once, on loading the map, not every frame, which will cause your game to lag.
I did delete the rest of the fog scripts last time. This time it was because of a Cloud Script that I borrowed from a friend which was causing the obstruction. After I deleted it, the fog does appear after all.
(Yes, I did read your script carefully, I know I need to use "erase_fog(number)")
Wait, the fog stick with me as I move around. I think there was a solution around these posts, so I'll keep browsing around here for a while.
(Yes, I did read your script carefully, I know I need to use "erase_fog(number)")
Wait, the fog stick with me as I move around. I think there was a solution around these posts, so I'll keep browsing around here for a while.
I hope this doesn't count as a double post, but it is quite separate from the above.
Even with the updated-ver script, the fog still doesn't move and sticks with me as I move around. Am I overlooking something?
Even with the updated-ver script, the fog still doesn't move and sticks with me as I move around. Am I overlooking something?
It is a double post - posting twice in a row - whether the two posts have anything to do with each other is irrelevant.
Put an Erase Event after the show_fog command. It's something that needs to happen once, on loading the map, then never again until you leave the map and return. By not erasing the event, you are re-showing the fog (re-initializing) every frame. This could be the reason.
Put an Erase Event after the show_fog command. It's something that needs to happen once, on loading the map, then never again until you leave the map and return. By not erasing the event, you are re-showing the fog (re-initializing) every frame. This could be the reason.
Yes, it was that! Now it moves just fine. Also, thanks for recommending me this script.
Wish I'd thought about that when others mentioned the problem. I'm still amazed at the number of people who don't erase parallel process events when they should - that could well be the reason for all of those issues.
Alright, the previous problem I posted about has returned. And so I give you this.
I've gone and cranked the opacity on the image to 255, as an example of what's happening. First, it treats the image's blend type as 0, then actually treats it normally.

This is what the call looks like. It's in a common event. There's another event that calls the common event, and then erases itself.
This is the file in question. I cannot for the life of me figure out what is causing it. I've compared it to older builds, and older builds work absolutely fine with the same call. The only thing that fixed it was making a new save file. So, figured I would let you know.
I've gone and cranked the opacity on the image to 255, as an example of what's happening. First, it treats the image's blend type as 0, then actually treats it normally.

This is what the call looks like. It's in a common event. There's another event that calls the common event, and then erases itself.
This is the file in question. I cannot for the life of me figure out what is causing it. I've compared it to older builds, and older builds work absolutely fine with the same call. The only thing that fixed it was making a new save file. So, figured I would let you know.
Didn't the last issue turn out to be something you'd done in your events? What build are you using now?
Sorry! I should clarify, older builds of *my* project. Not your script. I'm using 1.0, according to your script, however.
The last issue was something I assumed was on my end. In fact, it may very well still be on my end. If it is, it was probably fixed by starting a new save. Otherwise, the only thing that I can think of would be that could cause this would be this:
http://pastebin.com/nfWiH3wZ
In which case, perhaps this post should stand as a testament to the dangers of not starting new save files with every single change. 😛
The last issue was something I assumed was on my end. In fact, it may very well still be on my end. If it is, it was probably fixed by starting a new save. Otherwise, the only thing that I can think of would be that could cause this would be this:
http://pastebin.com/nfWiH3wZ
In which case, perhaps this post should stand as a testament to the dangers of not starting new save files with every single change. 😛
We should all be aware of the dangers of not starting a new game after adding a new script.
If you start a new game, does the problem happen?
If you start a new game, does the problem happen?
No, problem doesn't occur on new games.
To clarify, though, no new scripts have been added to this project. My build from 7/23/16 is, script-wise, identical to my build from today. In fact, when the call broke, I copied the call from the old revision to the current one, just to ensure they were the same call. Just kind of.. broke when I was testing a new cutscene I added. But, that same cutscene no longer breaks things in the new save.
To clarify, though, no new scripts have been added to this project. My build from 7/23/16 is, script-wise, identical to my build from today. In fact, when the call broke, I copied the call from the old revision to the current one, just to ensure they were the same call. Just kind of.. broke when I was testing a new cutscene I added. But, that same cutscene no longer breaks things in the new save.
Perfect, pretty much what I needed for the game!
Original thread: https://forums.rpgmakerweb.com/threads/multi-layer-fog.18835/




