Multi-Frame Sprite Issue

Okay, I'm back with my asinine script questions. I'm trying to use an 8-frame sprite for the first time ever and I'm, re-discovering why I haven't already done that.


I'm using FenixFyreX's Multi-Frame Sprites script for RMVXAce found here: http://forums.rpgmakerweb.com/index.php?/topic/1577-multiframe-sprites/


I think I get the gist of what I'm supposed to do, but it won't work, so I have to be missing something. I think I'm putting the right numbers in, but I don't think I'm putting them in the right place.


I've read comments that this script is really easy to use, well ha-ha to you, I'm just that incompetent with programming. Can anybody enlighten me as to what/where I have to edit to get the sprite to work right?


I'm using one of the 8-frame sprite templates from PVGames' Wild Steam pack. I've called it %RoyWalk.


So what line am I supposed to edit? I assume it's not line #30 of the script, since that seems to do nothing for me?


Any help is appreciated. Thank you.


~Rich
So what line am I supposed to edit? I assume it's not line #30 of the script, since that seems to do nothing for me?
Wrong, that is exactly the line you need to edit if you're using the % pattern.
But you can't edit it randomly, and it's unclear from the script if the key in the filename is supposed to be % or [%].


The main change neccessary is to tell it that your sprite has 8 frames (frame_max), otherwise it won't access the single frames correctly.
Okay, I changed %RoyWalk to [%]RoyWalk. That changed stuff, not I just has fewer sets of tripled legs on screen at a time.


This is what I've been changing line #30 to:


"[%]" => [[1,2,3,4,5,6,7,8], 4, 8],


I wind up with three sets of legs, then nothing, then three sets of upper bodies, then nothing, on a rotation depending on which direction I walk and how far. As I said, changing % to [%] made less sets of legs and upper bodies appear, but still not legit sprite.


I also tried this, thinking that maybe it thinks 1-7 is 8 frames, or something like that.


"[%]" => [[1,2,3,4,5,6,7], 4, 8],


That just causes a crash if I walk too far when it tries to read frame #8.
How many sprites are in the spritesheet?


Most probably the script works with the regular assumption of eight different sprites per sheet, and you still need the $ to switch to single sprite sheets
And ta-da! As usual it was something stupid on my part. Dollar sign for the win.


I changed the sprite's name to $[%]RoyWalk and it worked, although it was giving me an empty frame mid-animation. So I changed the code to this:


"[%]" => [[0,1,2,3,4,5,6,7], 4, 8],


And now it works perfectly. Thank you very much.

Original thread: https://forums.rpgmakerweb.com/threads/multi-frame-sprite-issue.41302/