I did mine slightly differently, Shaz. As instantiating a new RPG::MoveRoute automatically gives it an "end move route" command in its list, I used .unshift for my commands instead of push so that it would retain the finishing command on the end without me having to add one, but really nice tutorial. 🙂
Creating a Move Route with a Script command
RMVXAce TutorialsYes, that would work. But you'd have to add your movement commands in reverse order. That'd just confuse me 😀
Thanks Shaz, that worked perfectly for me! However, what if I wanted to choose a specific frame within the "transform1" picture that I changed the player to? Because, this is going to be an animation that plays when the player hits a certain button, but at the same time I'd rather not break up each frame into x amount of files to be called.
A specific frame? If you wanted a different index, you would just number them 0-8. The set_graphic command does not allow you to go down to a lower level. You would need to look for a different plugin or series of commands to allow that - it involves setting the direction, pattern, and original pattern, IIRC. If you work that out, you could add it to your script within a move route Script call, rather than a set_graphic call.
In PBMoveRoute, there are 4 different arguments, but I'm not sure how you'd set them:
Graphic = 41 # Name, hue, direction, pattern
Also, random question - I've never done anything with a frame counter before, and I was thinking about using something like this to create idle animations if the player stands still for long enough. I could just break up the player's sprite into separate files, if need be. The only problem I have, really, is the frame counter, since I'm not sure exactly how you can keep track of it or readily control it. I can do a normal counter, but not one that handles frames.
Edit, nevermind I just realized that a normal numerical counter is no different than a frame counter, because it's based on how many frames per second the game is running which determines that.
Original thread: https://forums.rpgmakerweb.com/threads/creating-a-move-route-with-a-script-command.59367/