Bigace360 38 Report post Posted December 19, 2011 How do you make skill animations appear using a script, as I was going to put in the skill menu, but I have no clue how to script that. Share this post Link to post Share on other sites
0 kellessdee 48 Report post Posted December 20, 2011 To display an animation you need 2 things: An object that either is a RPG::Sprite or a subclass of RPG::Sprite and the animation's ID. Once you have an object that is of the RPG::Sprite type, you can call sprite_object.animation( id, hit ) id is the Animation ID hit is either true or false, and represents whether the "hit" or "miss" animation is displayed. true will be handled as a hit. if you set the id to nil, the animation will stop. Also, there is: sprite_object.loop_animation( id ) This will cause the animation to continuously loop, until stopped RPG::Sprite#update will update any existing animations set to the sprite. Hope this is what you were looking for :) Share this post Link to post Share on other sites
0 Polraudio 122 Report post Posted December 20, 2011 Not to steal the topic but would that mean i can use this to target a picture in the script? EX: i have the player sprite shown in the skill menu and when i press P it will show what skill i have selected on the player sprite. Share this post Link to post Share on other sites
0 kellessdee 48 Report post Posted December 20, 2011 Yes and no. You would be able to do this, however, the way that RPG Maker's default menu is set up; it draws the player's sprite onto the window's bitmap; and there isn't a way to target that window or it's bitmap. (Neither are of the RPG::Sprite type) 2 (simple) ways to get around this (there are many ways, these are probably easiest to implement in an existing menu): 1. Create an empty RPG::Sprite, and position it to the same location as where the player's sprite is drawn, then call the animation. 2. Change the existing code to create the player's sprite AS a RPG::Sprite instead of drawing it to the bitmap, and position it in the right place; then call the animation. Lemme know if you need more help/example on how to do this. Share this post Link to post Share on other sites
0 Bigace360 38 Report post Posted December 20, 2011 THanks for the help I'll get to it soon as finish this other thing. Share this post Link to post Share on other sites
How do you make skill animations appear using a script, as I was going to put in the skill menu, but I have no clue how to script that.
Share this post
Link to post
Share on other sites