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

abreyer3

Villager
Member
Joined
Oct 26, 2015
Messages
12
Reaction score
1
First Language
English
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
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
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.
 
Last edited by a moderator:

abreyer3

Villager
Member
Joined
Oct 26, 2015
Messages
12
Reaction score
1
First Language
English
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?
 

abreyer3

Villager
Member
Joined
Oct 26, 2015
Messages
12
Reaction score
1
First Language
English
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
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,568
Latest member
invidious
Top