Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Auto-Repeat Animation
#1
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
[Image: 2v80ot5.jpg]


Script
Place it above main
[Image: 25thhqt.jpg]
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)
* 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:
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?
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Character's Dash Animation kyonides 0 89 04-08-2024, 03:50 AM
Last Post: kyonides
   Victor Engine - State Auto Apply Victor Sant 0 3,712 06-25-2012, 12:17 AM
Last Post: Victor Sant
   Auto Equip Optimizer for Guillaume777's MultiSlots DerVVulfman 1 6,265 06-20-2012, 03:26 PM
Last Post: buddysievers
   Auto Populate Maps, Version 0.5 Charlie Fleed 14 24,126 03-17-2012, 03:04 PM
Last Post: LilyKnight
   Animation : Ground Kain Nobel 1 4,764 01-12-2012, 08:33 AM
Last Post: yamina-chan
   Victor Engine - Loop Animation Victor Sant 0 4,183 01-01-2012, 02:23 PM
Last Post: Victor Sant
   Victor Engine - Cast Animation Victor Sant 0 4,148 12-21-2011, 07:48 AM
Last Post: Victor Sant
   Auto-Sizing Text Windows RPG Advocate 9 16,761 06-11-2011, 06:18 PM
Last Post: sagam12
   Message Shutter Animation Myownfriend 9 12,876 04-06-2010, 11:14 AM
Last Post: Ace
   Animation Bug Fixed woratana 0 3,675 01-22-2009, 01:22 PM
Last Post: woratana



Users browsing this thread: