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



필드에서 캐릭터 애니메이션을 추가합니다.
  • ?
    레드륨 2014.07.03 18:28

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

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

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 7144
공지 RPG VX ACE 유용한 링크 모음 16 아방스 2012.01.03 31086
217 그래픽 셰이크 강화 스크립트 file 시낵스 2023.12.13 674
216 오디오 볼륨변경 스크립트 레기우스州 2020.08.09 706
215 전투 LNX11 전투 RPGXP 전투처럼 만들기 큔. 2018.11.23 1709
214 온라인 브라우저 열기 스크립트 1 큔. 2018.09.09 881
213 타이틀/게임오버 GG침 스크립트 file 큔. 2018.07.18 1033
212 메뉴 파티 개별 인벤토리 스크립트 안나카레리나 2018.06.25 946
211 전투 기본전투의 커스텀 명중률 제작 안나카레리나 2018.06.10 735
210 기타 LUD Script Package file LuD 2017.08.15 1268
209 맵/타일 레이어 맵 <layer> 기능 2 file LuD 2017.08.03 1715
208 HUD 아이템 레어리티 스크립트 (번역기 돌림) 2 file 부초 2017.07.21 1682
207 기타 (링크)RPG VX ACE 블랙잭 스크립트 게임애호가 2017.06.18 1222
206 전투 SPRG 컨버터 NEXT 1 file 게임애호가 2016.06.09 2119
205 전투 Tomoaky's RGSS3_SRPG ver.0.15a 한국어번역 3 file 초코빙수 2016.06.05 2291
204 맵/타일 Map Zoom Ace by MGC 습작 2016.02.28 1216
203 메시지 Item Choice Help Window for Ace 2 file 습작 2016.02.15 1574
202 기타 '결정 키로 이벤트 시작' 조건분기 추가 file Bunny_Boy 2016.01.16 1373
201 그래픽 커스텀 아이콘 적용하기 2 file 간로 2015.09.28 3019
200 버그픽스 RGSS3 Unofficial Bug Fix Snippets Alkaid 2015.09.09 851
199 이동 및 탈것 Khas Pathfinder(길찾기 스크립트) 15 찬잎 2015.07.10 2205
198 메시지 아이템 정보 메세지가 뜨는 아이템 획득 1 폴라 2015.05.21 2738
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11