11-17-2009, 08:55 AM
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!
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!