Difference between revisions of "How to Get Animation Frame Durations"
Line 19: | Line 19: | ||
== Instructions == | == Instructions == | ||
− | === Step 1 === | + | === Step 1: Create New Event === |
[[File:FrameCountTutorial2.png|600px]] | [[File:FrameCountTutorial2.png|600px]] | ||
Line 27: | Line 27: | ||
− | === Step 2 === | + | === Step 2: Set Variable === |
[[File:FrameCountTutorial3.png]] | [[File:FrameCountTutorial3.png]] | ||
Line 41: | Line 41: | ||
− | === Step 3 === | + | === Step 3: Play Animation === |
[[File:FrameCountTutorial1.png]] | [[File:FrameCountTutorial1.png]] | ||
Line 51: | Line 51: | ||
− | === Step 4 === | + | === Step 4: Subtract Variable === |
[[File:FrameCountTutorial4.png]] | [[File:FrameCountTutorial4.png]] | ||
Line 65: | Line 65: | ||
− | === Step 5 === | + | === Step 5: Invert Variable Value === |
[[File:FrameCountTutorial4b.png]] | [[File:FrameCountTutorial4b.png]] | ||
Line 73: | Line 73: | ||
− | === Step 6 === | + | === Step 6: Show Message === |
[[File:FrameCountTutorial5.png]] | [[File:FrameCountTutorial5.png]] |
Revision as of 16:49, 24 January 2024
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.
IntroductionEver wanted to figure out how many frames an animation is? You probably know that in RPG Maker MV, the animation frames listed in the database don't equal the wait duration in the game. Or in RPG Maker MZ, the Effekseer animations don't even have durations listed at all. Here's how to figure them out. This will be a TL;DR article without all the fluff text.
InstructionsStep 1: Create New EventFirst, create a new event.
Step 2: Set VariableNext, create a Control Variable event command with this as the Script value: Graphics.frameCount Make sure Set is selected.
Step 3: Play AnimationNext, make the event play the animation you want to time. Make sure Wait for Completion is checked.
Step 4: Subtract VariableNext, create a Control Variable event command with this as the Script value: Graphics.frameCount Make sure Sub(tract) is selected.
Step 5: Invert Variable ValueFollow that up with another Control Variant event command and Multiply it by -1.
Step 6: Show MessageFinally, create a Show Message displaying the variable value with the variable code listed: Duration: \V[20]
Final EventThis is what the final event should look like.
Test It OutTime to play test. Yay, it works! I recommend you put this event somewhere in a debug room for quick access in case you ever have to figure out the full frame durations of many different animations.
ConclusionThat's it. Nothing terribly special or verbose. Just some quick get it out of the way stuff for people who know their way around RPG Maker and just want to get things done.
End of Article |