Ace 스크립트

#------------------------------------------------------------------------------#
#  Galv's Character Animations
#------------------------------------------------------------------------------#
#  For: RPGMAKER VX ACE
#  Version 2.0
#------------------------------------------------------------------------------#
#  2013-01-24 - Version 2.0 - Significant changes for performance increase.
#  2013-01-07 - Version 1.7 - Slight tweaks
#  2012-10-06 - Version 1.6 - Updated alias names for compatibility
#  2012-10-06 - Version 1.5 - Added dash speed option. Fixed some code
#  2012-09-21 - Version 1.4 - Optimised the code significantly (to my ability)
#                           - Some bug fixes
#  2012-09-21 - Version 1.3 - Added ability to repeat common event
#                           - Added follower animations
#  2012-09-20 - Version 1.2 - fixed compatibility with Galv's Region Effects
#  2012-09-20 - Version 1.1 - added idle common event, removed unnecessary code
#  2012-09-20 - Version 1.0 - release
#------------------------------------------------------------------------------#
#  Designed to give actors additional animations such as:
#  - Idle
#  - Walking
#  - Dashing
#  - Custom (run a common event if you've been idle for a period of time)
#
#  INSTRUCTIONS:
#  1. Copy this script below materials and above main
#  2. Create your charsets to use one characterset per actor. (This is where
#     version 2 differs from version 1 greatly.
#     The first character in the charset is the Idle animation
#     The second character in the charset is the Walk animation
#     The third character in the charset is the Dash animation
#
#  (See demo if you don't understand) This change was done to reduce processing
#  significantly and prevent lag when doing too much at once)
#
#------------------------------------------------------------------------------#
#  KNOWN ISSUES:
#  - Move Route Change graphic commands only work when the switch is on.
#    Then if you turn it off again, the graphic changes back to the original.
#    Use "Set Actor Graphic" event command to change instead.
#------------------------------------------------------------------------------#
 
($imported ||= {})["Chara_Anims"] = true
module Chara_Anims
   
#------------------------------------------------------------------------------# 
#  SETUP OPTIONS
#------------------------------------------------------------------------------#
 
  ANIM_SWITCH = 1             # ID of a switch to disable this effect.
                              # Turn switch ON in order to use change graphic
                              # move route commands. Turn off to restore anims.
                               
  DASH_SPEED = 1.2            # 1 is RMVX default dash speed.
 
  COMMON_EVENT = 1            # Common event ID that plays after a certain time
  COMMON_EVENT_TIME = 300     # Frames idle before common event called.
  REPEAT_EVENT = false        # Repeat this common event if player remains idle?
                              # (restarts the common event time) true or false.
#------------------------------------------------------------------------------# 
#  END SETUP OPTIONS
#------------------------------------------------------------------------------#
 
end # Chara_Anims
 
 
class Sprite_Character < Sprite_Base
  alias galv_charanim_initialize initialize
  def initialize(viewport, character = nil)
    @idletime = 0
    galv_charanim_initialize(viewport, character)
  end
 
  alias galv_charanim_update update
  def update
    galv_charanim_update
    return if $game_switches[Chara_Anims::ANIM_SWITCH]
    return move_anim if $game_player.moving?
    @idletime += 1
    idle_anim if @idletime == 5
    idle_event if @idletime == Chara_Anims::COMMON_EVENT_TIME
  end
 
  def idle_anim
    $game_player.step_anime = true
    if $game_party.leader.character_index != 0
      $game_party.battle_members.each { |m| m.set_g(0) }
      $game_player.refresh
    end
    @idletime += 1
  end
 
  def move_anim
    if $game_player.dash?
      if $game_party.leader.character_index != 2
        $game_party.battle_members.each { |m| m.set_g(2) }
        $game_player.refresh
      end
    else
      if $game_party.leader.character_index != 1
        $game_party.battle_members.each { |m| m.set_g(1) }
        $game_player.refresh
      end
    end
    @idletime = 0
  end
 
  def idle_event
    return @idletime = 0 if $game_map.interpreter.running?
    $game_temp.reserve_common_event(Chara_Anims::COMMON_EVENT)
    @idletime = 0 if Chara_Anims::REPEAT_EVENT
  end
end # Sprite_Character < Sprite_Base
 
 
class Game_CharacterBase
  alias galv_charanim_init_public_members init_public_members
  def init_public_members
    galv_charanim_init_public_members
    @step_anime = true
  end
   
  # OVERWRITE FOR PERFORMANCE PURPOSES
  def real_move_speed
    @move_speed + (dash? ? Chara_Anims::DASH_SPEED : 0)
  end
end # Game_CharacterBase
 
 
class Game_Actor < Game_Battler
  def set_g(i)
    @character_index = i
  end
end # Game_Actor < Game_Battler
 
 
class Game_Player < Game_Character
  attr_accessor :step_anime
end # class Game_Player < Game_Character



필드에서 캐릭터 애니메이션을 추가합니다.

Who's 스리아씨

?
뺘라뺘뺘
  • ?
    레드륨 2014.07.03 18:28

    좋긴한데 설명이필요할것같아요.. 무슨무슨행동이미지가 필요한지..

  • profile
    왜티 2015.04.19 17:10
    필드에서 어떤 캐릭터 애니메이션을 추가하는 거에요?
  • profile
    홍직설 2015.09.24 05:04
    데모확인해보니 그냥 대기모션 추가네요..그닥 필요는 없을듯한...

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 5110
공지 RPG VX ACE 유용한 링크 모음 16 아방스 2012.01.03 28925
157 파티 맵에서 4명 이상 대열 이동 가능수 조절하는 스크립트 5 Omegaroid 2013.10.17 1785
156 기타 게임속 이벤트를 텍스트 파일로 추출 2 file 영감쟁e 2013.10.15 3769
155 전투 스킬 캐스팅 시스템 3 스리아씨 2013.10.12 32162
154 전투 자동전투 명령어 추가 스크립트 2 스리아씨 2013.10.11 1953
153 전투 공격시 반동데미지 스크립트 8 스리아씨 2013.10.11 1882
152 변수/스위치 Simple self switches(간단한 셀프 스위치) 4 한국사수련생 2013.10.04 1433
151 변수/스위치 Mog Event Sensor Range 4 file 이클립스 2013.09.30 1570
150 전투 Symbol Encounter 5 파송송뇌진탕 2013.09.29 2531
149 상점 Shop Stock < 상점에서 판매하는 아이템의 수량 제한 > 2 file 스리아씨 2013.09.26 1876
148 기타 아이템 합성 스크립트 4 file 스리아씨 2013.09.26 3138
147 메시지 Text Skip [ 메시지 스킵 ] 4 file 스리아씨 2013.09.26 2989
146 타이틀/게임오버 No Game Over 1 file 스리아씨 2013.09.26 2399
145 HUD 동방프로젝트(풍신록) 맵 이름 표시 3 file 스리아씨 2013.09.24 3254
144 기타 크리스탈 엔진 : 포켓몬 배틀 시스템 7 file 스리아씨 2013.09.24 3894
143 액터 액터 스탯 분배 스크립트 14 file 스리아씨 2013.09.23 2678
142 기타 이동제한 스크립트 5 file 스리아씨 2013.09.23 1769
141 HUD ReinoRpg Hudre 5 file 스리아씨 2013.09.22 2786
140 기타 KGC 스텟 포인트 분배 스크립트 4 file 스리아씨 2013.09.21 1812
139 버그픽스 Event Jitter Fix/Display Rounding Error Fix by Neon Black Alkaid 2013.08.31 1003
138 메뉴 저장금지시 메뉴에 저장 안 뜨게 하기 5 file Bunny_Boy 2013.08.24 2519
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11