Posts: 1,664
Threads: 391
Joined: May 2009
Heya! Okay, this is something I totally need help figuring out.
Anyway, I've this new scene I've scripted, which is totally unrelated to maps and battles. I'm trying to figure out how to get it to play an animation from the database, I've no idea how to pull it off, so I was wondering if anyone could show me how. :p
Posts: 11,212
Threads: 648
Joined: May 2009
So.... you are making an actual script that is to call a battle animation? Not a game map animation or battle animation?
Posts: 937
Threads: 101
Joined: May 2009
Well, this might differ a little depending on if you're using VX or XP, and the example I'm posting is XP so... yeah.
Basically, the way animations are handled and executed are through the RPG::Sprite class, a hidden class which you can actually access a copy of from the RM Help file. So, in order to play an animation in, for example, the window of a menu, you'll need an object within that menu which inherits from this class (RPG::Sprite).
If you're wanting it to display in a blank window, then I'd just make an inherited RPG::Sprite class that overlays the window in question (ie, the viewport must match the window's demensions.) Otherwise, if you're wanting to make a window which shows an actor/enemy which the animation would be executed on, create the desired Viewport and initialize a Sprite_Battler representing the actor/enemy within your scene.
Oh yeah, before I forget, if you're doing it with an actor/enemy, then you can call battler.animation_id = (animation_id), and when it updates it automatically plays the animation for you. Else, if you're doing it directly with the RPG::Sprite class, then your syntax will be sprite.animation(animation_id, hit_result).
Hope I've helped you some! You've got me curious and interested in seeing whatever you're working on :D
BTW, if you need any further help, you always know where to find me! I'll be glad to help you, and keep up the good scriptin's!