Creating a looping, scrolling fog overlay

Hello all! I'm wondering how I can create a looping fog overlay (just like how you can by default in rmxp and later makers) in rm2k3.

I know it's possible using the show picture command, and probably variables, but I can't seem to figure out how to do it, especially getting the image (about a 640x480 picture) to loop seamlessly and also scroll according to the player's movement (kinda like how the parallax backgrounds work in this maker. If it's not possible (or extremely complicated) to get the player's movement to affect the movement, then just static scrolling is fine too.
Depending on the direction the fog runs, you have to redraw a complete copy, so that when it completes the movement it looks exactly like the initial position, that is, if the image runs from left to right or from right to left it should be 640x240 instead of 320x240, test it with this:
RPG2k3-Clouds.png

I used blue in part of the clouds to understand where the image ends and where it begins, but in the event it should look like this:
Code:
@> Show Picture: 1, 'Rm2k3-Clouds', (0,120), 100%, 0%, M6
@> Move Picture: 1, (320,120), 100%, 0%, @3.0s, Wait
Or:
Code:
@> Show Picture: 1, 'Rm2k3-Clouds', (320,120), 100%, 0%, M6
@> Move Picture: 1, (0,120), 100%, 0%, @3.0s, Wait

If it runs diagonally it will need 640x480
Depending on the direction the fog runs, you have to redraw a complete copy, so that when it completes the movement it looks exactly like the initial position, that is, if the image runs from left to right or from right to left it should be 640x240 instead of 320x240, test it with this:
View attachment 325041
I used blue in part of the clouds to understand where the image ends and where it begins, but in the event it should look like this:
Code:
@> Show Picture: 1, 'Rm2k3-Clouds', (0,120), 100%, 0%, M6
@> Move Picture: 1, (320,120), 100%, 0%, @3.0s, Wait
Or:
Code:
@> Show Picture: 1, 'Rm2k3-Clouds', (320,120), 100%, 0%, M6
@> Move Picture: 1, (0,120), 100%, 0%, @3.0s, Wait

If it runs diagonally it will need 640x480
Thank you so much! This method worked perfectly!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/creating-a-looping-scrolling-fog-overlay.173779/