Eventing a Loop Animation in RPG Maker MZ
Heyhey! This is a bit different from my usual posting, but I wanted to make a brief tutorial on how to make an animation in rpg maker mz using just the event system and pictures, no plugins required. I found some tutorials online that were kind of helpful, but nothing that had exactly what I needed, so it was a bit of trial and error. I hope this helps anyone looking to do the same thing.
So, once you know how to do this it's actually pretty simple. You make a loop event, then add however many pictures you want with the desired coordinates and sizing, then add a wait command for the desired number of frames in between each picture. To break the loop, there are a couple of really important pieces to know.
First, which command to use? There is a 'break loop' command, but what worked for me was creating a conditional branch. On page 4 of the conditional branch, there are options for 'button' and 'script'. You can use button for this ("button ok is being pressed") but if you do exiting the animation will require a long press. Not the end of the world, but not super clean either. Instead, use the Input.isPressed('ok') script, which will read it even if it's a short press. Have the condition set to wait, then jump to label (doesn't matter what the label is named, just make sure that jump to label and label are named the same).
Second, order is important. Duh. If you put the conditional branch at the end of the loop, it won't read a button press unless the loop had already completed once. If you put it before the first picture, you can press the ok button at any time and immediately exit the animation. Sweet.
Finally, the label. Jumping to a set label outside the loop will effectively break the loop by enabling the event page to start reading the rest of the commands. Just make sure to put the Label before the erase picture command and your good to go (on the topic of erase picture, make sure all the picture you show in the animation loop have the same number, and if you want a background image behind the animation the background number should be lower than the number assigned to the animation pictures).
Edit: if you copy/paste the conditional branch after every picture, the exit process will be quicker than if it's just at the top
















