TheoAllen 830 Posted June 16, 2014 Individual Animation Rate Introduction : For anyone who want to set up individual animation rate for each animation in database, this script might help you. What is the mean of animation rate anyway? It's a speed rate how animation is being played. By default, one frame animation is same as 4 frame. By adding this script, you can speed up animation speed rate. Script : #=============================================================================== # Simple Individual Animation Rate # By : TheoAllen #------------------------------------------------------------------------------- # # Usage : # Put this script below material but above main. Also if you use YEA - Core # Engine put this script below YEA. # # To setup an animation rate for each animation in database, add following # tag to animation name # # <rate: n> # # Replace n with any number. The lowest value, the faster animation will be # played. By default, animation rate is 4. # # Example for animation name in database: # Fireball<rate:2> # # This just a simple script snippet. You're free to edit or repost it anywhere. # However, if you a good person, please do not claim # #------------------------------------------------------------------------------- # End of instruction #=============================================================================== class RPG::Animation Default_Rate = 3 # <-- Change default anim rate for all animations here def anim_rate return @anim_rate if @anim_rate @anim_rate = Default_Rate if name[/<rate:\s*(\d+)>/] @anim_rate = $1.to_i end return @anim_rate end end class Sprite_Base # Overwrite animation rate def set_animation_rate @ani_rate = @animation.anim_rate end end Sample usage : This just a simple snippet. Feel free to edit, repost, or even use in commercial game. 3 Share this post Link to post Share on other sites
Faye V. 52 Posted June 16, 2014 This is genius. Your scripts are so useful. Hella of a nice one! 1 Share this post Link to post Share on other sites