Problem with script calling Show Picture with Wait Command in a While Loop

Hello, I've run into a weird problem. I am trying to script call using the show picture command and the wait command in a while loop so that I can animate the player. I figured out how to code it, but it doesn't run like it's supposed to.

The screenshot shows the code in question. It's supposed to show the image, wait 5 frames, show the next image, etc. In total, it should be showing 90 images.

The files are all named correctly (i.e. "Player0_010", "Player0_011". "Player0_012", etc.) and are all there, and there is no error popping up, but when this script executes, it jumps to the last picture  ("Player0_099") immediately without going through the other ones. I've tested it doing it with event commands (a lot more time it takes and it looks a lot messier) and it works fine, but it doesn't work correctly when using the script event command. Is there something I'm missing?

If anyone could test this out, and see if you get the same problem, it will be much appreciated. I'm thinking it may just be a bug. Before you ask, yes, I turned OFF all my plugins and did it in a clean project with the same problem. If you need more info, I'll be happy to provide it.

RMMV Screenshot.png
I haven't checked the coding in MV, but best guess is that the wait command won't work inside a script command box.


You have to remember what the wait command really is - the effect for the player looks like a wait, but it's not a timefunction.


In Ace, it basically said "skip the execution of this event for the next X cycles of the game loop" - with each loop creating a frame of the gametime.


But since the scriptbox is not part of the game loop, it'll either ignore the wait command or execute it in computercycles (you know, processor time, 2GHz = 2 Giga operations per second).


Your loop does NOT jump to the last picture - it displays everyone of those pictures. The display just scrolls through faster than the human eye can see.
I haven't checked the coding in MV, but best guess is that the wait command won't work inside a script command box.

You have to remember what the wait command really is - the effect for the player looks like a wait, but it's not a timefunction.

In Ace, it basically said "skip the execution of this event for the next X cycles of the game loop" - with each loop creating a frame of the gametime.

But since the scriptbox is not part of the game loop, it'll either ignore the wait command or execute it in realtime.

Your loop does NOT jump to the last picture - it displays everyone of those picture. The display just scrolls through faster than the human eye can see.
Ok, I kinda figured that it did go through all the pictures at light speed. Although, the wait command does work in script. I bumped it up to 500 frames, the game does pause, however, the pictures still go through light speed. What perplexes me is that it didn't happen like that in VX Ace. The images waited to be displayed correctly. So, I guess that the script event command has been altered in some way that the wait command doesn't function as it used to.

Would there be a way to fix this, maybe with some sort of "graphics freeze?" Or am I out of luck?
I found a solution around this problem. It seems that the problem was using the wait command in a script call. For some reason, it has different properties compared to the wait command in the event command options. Just in case anyone else is interested or is having the same trouble, here's what I put:

RMMV Screenshot.png

Original thread: https://forums.rpgmakerweb.com/threads/problem-with-script-calling-show-picture-with-wait-command-in-a-while-loop.49512/