01-22-2009, 01:10 PM
Auto-Repeat Animation
Version 1.0
by Woratana
Release Date: 21/05/2008
Introduction
This is a little snippet that will allow you to set repeat animation on character in map.
Repeat animation will show again and again after the last animation in that character finished~
Enjoy~ :lol:
Screenshots
It's not needed, but I have if you want~ :P
Script
Place it above main
Instruction
To set repeat animation to character, call script:
* character: What character you want to set repeat animation?
** -1 for 'Player', 0 for 'This Event', and 1 or more for Event ID
* animation_id: ID of the animation you want to set as repeat animation
** use 0 to remove repeat animation~
For example:
* Script above will set Animation ID 5 as repeat animation for Event ID 10
Author's Notes
Free for use in your work if credit is included.
Please do not redistribute this script without permission. If you want to post it on any forum, please link to this topic.
Bug Report?
Please give me these informations:
Version 1.0
by Woratana
Release Date: 21/05/2008
Introduction
This is a little snippet that will allow you to set repeat animation on character in map.
Repeat animation will show again and again after the last animation in that character finished~
Enjoy~ :lol:
Screenshots
It's not needed, but I have if you want~ :P
Script
Place it above main
Code:
#===============================================================
# ? [VX Snippet] ? Auto-Repeat Animation ? ?
# * Show animation again and again on character in map~ *
#--------------------------------------------------------------
# ? by Woratana [woratana@hotmail.com]
# ? Thaiware RPG Maker Community
# ? Released on: 21/05/2008
# ? Version: 1.0
#--------------------------------------------------------------
#==================================================================
# ** HOW TO USE **
#-----------------------------------------------------------------
# To set repeat animation to character, call script:
# set_anim(character, animation_id)
#
# * character: What character you want to set repeat animation?
# ** -1 for 'Player', 0 for 'This Event', and 1 or more for Event ID
# * animation_id: ID of the animation you want to set as repeat animation
# ** use 0 to remove repeat animation~
# For example:
# set_anim(10, 5)
# * Script above will set Animation ID 5 as repeat animation for Event ID 10
#==================================================================
class Game_Interpreter
def set_anim(character, anim_id)
get_character(character).repeat_anim = anim_id
end
end
class Game_Character
attr_accessor :repeat_anim
alias wora_autorepani_gamcha_ini initialize
def initialize
@repeat_anim = 0
wora_autorepani_gamcha_ini
end
end
class Sprite_Character < Sprite_Base
alias wora_autorepani_sprcha_upd update
def update
wora_autorepani_sprcha_upd
unless @animation_duration > 0
@character.animation_id = @character.repeat_anim
end
end
end
Instruction
To set repeat animation to character, call script:
Code:
set_anim(character, animation_id)
* character: What character you want to set repeat animation?
** -1 for 'Player', 0 for 'This Event', and 1 or more for Event ID
* animation_id: ID of the animation you want to set as repeat animation
** use 0 to remove repeat animation~
For example:
Code:
set_anim(10, 5)
Author's Notes
Free for use in your work if credit is included.
Please do not redistribute this script without permission. If you want to post it on any forum, please link to this topic.
Bug Report?
Please give me these informations:
Quote:- What is it says in error window?
- When is it get error? (Right after run game, when you choose something, etc.)
- Do you have any other scripts running in your game that may crash with this script?