[Question] How to animate picture

Hi,

First, I'm new on here, so sorry if a similar topic already exist or if this one isn't in the right place.

Well, Basicaly I'm making a evented-menu system wich work only with pictures. It works perfectly, but to make it look better, I'd like to make it aniamted. I used a tutorial to create this system so if you want to take look a it, go there: http://forums.rpgmakerweb.com/index.php?/topic/25696-event-based-custom-menu-tutorial/. I could help you understand my problem.

I want it to be animated so when a option is selected, the picture of this option change every X frames to make it look like it move. I tried to make it work with loops and breaks loops but even if the picture animation was perfect, the game didn't respond to any of my command. I tried severals times but I failled...

Please can you help me ?
Assuming yours is similar to this (Got it from that link you posted)

Spoiler
jb4j1e.png
What you need to do is under Conditional Branch (With the Menu's which tells you which picture you use) you need to have a counter in there. Basically That whole event above will loop.

Simplified Instructions

To show a picture frame by frame to give it the illusion as if its changing/moving, all you need is simply a counter in each of the "show picture" (Under the Conditional Branches) It will be extremely tedious (with events alone).

Spoiler
vyML3Ry.png
Your 'single' conditional block for the show picture should looks like something like this.

Basically what your seeing is an example if your current menu is picked, not only will it will show the picture, but every time it runs through the loop it will add +1 to the counter so when it goes through the loop again it will change to a different picture with that variable.

*Note - Make sure when your select a different menu (like options to exit) you reset the counter back to 0.

I'm sure I made some mistake somewhere but this should work with the event system your trying to do. (Really tedious for frame by frame).

See if you can fiddle around with your event like this.
Sorry, I didn't understand it all but thanks for your answer and instructions. Basically I don't even know what a counter is and what it do and can't find this answer anywhere... English isn't my first language so it's a bit complicated for me, sorry. Also I didn't really understand where I should put the code you where talking about and what where the variables doing.

I if I could use GIFs as pictures, the whole problem would be solved, so do you know if there is script for that that would work in this very situation ?
Well if your new to eventing I can see how its hard trying to make a picture give the effect that its moving. I suggest you fiddle around with events a bit more (That tutor you have is a great example)

As for the gif script, Gifs aren't supported but there is a script that works like a gif (basically many pictures being looped) over here.

However the script isn't newbie friendly :/ so follow the instructions carefully.

It is possible to achieve what your trying to do, just practice practice, and practice. Eventually you will get it 🙂  
Hey... I'm not new to eventing ! It's been 6 month already since I'm working on my project so I've already got some practice with event, variables and everything. I'm just new to english and it was hard for me to figure out what a counter is, nothing more.

Anyway, After thinking really hard about it, I'd just manage to understand what you said and did it in my game !  😀

I wasn't too long and it was easier than I thought. It worked perfectly but there was just on problem: It was way too fast. Of course it was because there is no "wait". So I put one. But I just got the same problem as the one I got in the beggning: my commands didn't respond. I also tried others methods but I didn't got the result I expected. So do you have any method to display the pictures for more than 1 frame whithout freezing all the commands ?

Oh, and about the script you talked about, I already knew about it but I didn't really wanted to learn how to use it since it look very complicated and that I didn't even know if it could solve my problem. If it couldn't it would have been a waste of time...
Okay I got it! Woot!  😀

So instead of using wait inside of that autorun loop (Which will cause the game to lock up) instead you put it into a separate event (with parallel process) that will handle counting the frames for you.

To easily explain this i made a quick game to show you how its done here.

Fill free to try it! Open it up and look at the contents, you will pick up on it fast. Hopefully this will solve all your problems.  😉
Cool ! It worked. Thanks a lot, and great job for the demo: It's well explained. Oh, and I laughed when I saw you wrote somme text in french. That was nice, thank you very much ! 🙂
To add a bit to what Ramil said, I've done something very similar to create animations on screen as part of dialog.  What I did different was set the animation up as a Common Event and placed all the images inside a Loop.  I set this Common Event to be triggered by a Switch, and set the Common Event to run as a Parallel process.  Then I turned the animation on or off using a Switch in my dialog when I wanted to play that animation.  The advantage of using a Common Event for this is that I don't have to re-script the whole animation every time I want to call it, I just turn the switch on and presto, there it is.

Not sure if that would work better for you, but consider it food for thought.
Thanks, BardicHeart. Your method is good too, but it will not be very usefull for me now since I will use thoses animations only once in my game. Anyway, It will probably be usefull later, so thanks for the advice. 👍  

 

Original thread: https://forums.rpgmakerweb.com/threads/question-how-to-animate-picture.35049/