질문과 답변

Extra Form

절대 '애니메이션 표시 종료까지 대기' 에 체크하지 않았습니다...


애니메이션 표시를 하게 될 경우 이벤트 명령 '대기'를 사용한 것과 같은 현상이 짧게 발생합니다.


VX ACE 에서 기본적으로 애니메이션 표시시 딜레이가 발생하도록 만들어놓은 것 같은데요


스크립트 에디터를 뒤적거려보니 sprite_base 에서 62~64번째 줄


  def set_animation_rate

    @ani_rate = 4     # 기본적으로 고정 값

  end


이부분 때문인것 같습니다.


저 4 수치를 낮게/높게 설정하면 대기 현상의 시간도 줄어들거나/늘어납니다.


대기 현상을 완전히 없애버리기 위해 수치를 0으로 만들면 당연히 에러 발생합니다...


스크립트 실력이 허접이라 여기서 막히네요  어떻게 해야 할까요 ㅠㅠㅠ

Comment '3'
  • ?
    winspec 2012.11.18 17:35
    저도 초보라 자세히 모르지만 sprite_base를 살펴보니
    def update_animation
    return unless animation?
    @ani_duration -= 1
    if @ani_duration % @ani_rate == 0
    if @ani_duration > 0
    frame_index = @animation.frame_max
    frame_index -= (@ani_duration + @ani_rate - 1) / @ani_rate
    animation_set_sprites(@animation.frames[frame_index])
    @animation.timings.each do |timing|
    animation_process_timing(timing) if timing.frame == frame_index
    end
    else
    end_animation
    end
    end
    end
    이런 부분이 있네요 위에 공식을 자세히보시면
    frame_index -= (@ani_duration + @ani_rate - 1) / @ani_rate
    이런부분이 있습니다 쉽게말하자면
    @ani_rate = 1로 설정했을때 최고속도인것 같네요
    어디에 쓰실건진 모르지만 기본설정은 되도록안건드리는편이 ㅎㅎ;
    아니면 다른 고수분게...
  • ?
    winspec 2012.11.18 17:44

    def start_animation(animation, mirror = false)
    dispose_animation
    @animation = animation
    if @animation
    @ani_mirror = mirror
    set_animation_rate
    @ani_duration = @animation.frame_max * @ani_rate +1
    load_animation_bitmap
    make_animation_sprites
    set_animation_origin
    end
    end
    추가로 찾은부분인데요 공식에서 +1부분을 지워주시면 

    결과적으로 ani_rate가 0 이되고 ani_duration만 남기때문에  최고속도라고 할수있겟네요

  • ?
    펭블♡ 2013.02.21 19:07
    저도 그거때매 고민햇는데 이거쓰시면됩니다.
    안티 애니메이션 랙 스크립트입니다.

    #===============================================================================
    # ■ Game_Temp
    #===============================================================================
    class Game_Temp
    attr_accessor :animation_garbage

    #--------------------------------------------------------------------------
    # ● Initialize
    #--------------------------------------------------------------------------
    alias mog_anti_lag_animation_initialize initialize
    def initialize
    @animation_garbage = []
    mog_anti_lag_animation_initialize
    end

    end

    #===============================================================================
    # ■ Game System
    #===============================================================================
    class Game_System

    attr_accessor :anti_lag_animation

    #--------------------------------------------------------------------------
    # ● Initialize
    #--------------------------------------------------------------------------
    alias mog_antilag_animation_initialize initialize
    def initialize
    @anti_lag_animation = true
    mog_antilag_animation_initialize
    end

    end

    #===============================================================================
    # ■ SceneManager
    #===============================================================================
    class << SceneManager

    #--------------------------------------------------------------------------
    # ● Call
    #--------------------------------------------------------------------------
    alias mog_anti_lag_animation_call call
    def call(scene_class)
    mog_anti_lag_animation_call(scene_class)
    dispose_animation_garbage
    end

    #--------------------------------------------------------------------------
    # ● Goto
    #--------------------------------------------------------------------------
    alias mog_anti_lag_animation_goto goto
    def goto(scene_class)
    mog_anti_lag_animation_goto(scene_class)
    dispose_animation_garbage
    end

    #--------------------------------------------------------------------------
    # ● Dispose Animation Garbage
    #--------------------------------------------------------------------------
    def dispose_animation_garbage
    return if $game_temp.animation_garbage == nil
    for animation in $game_temp.animation_garbage
    animation.dispose
    end
    $game_temp.animation_garbage = nil
    end

    end

    #==============================================================================
    # ■ Game Map
    #==============================================================================
    class Game_Map

    #--------------------------------------------------------------------------
    # ● Setup
    #--------------------------------------------------------------------------
    alias mog_anti_lag_animation_setup setup
    def setup(map_id)
    SceneManager.dispose_animation_garbage
    mog_anti_lag_animation_setup(map_id)
    end

    end

    #==============================================================================
    # ■ Scene Base
    #==============================================================================
    class Scene_Base

    #--------------------------------------------------------------------------
    # ● Terminate
    #--------------------------------------------------------------------------
    alias mog_anti_lag_animation_terminate terminate
    def terminate
    mog_anti_lag_animation_terminate
    SceneManager.dispose_animation_garbage
    end

    end

    #==============================================================================
    # ■ Sprite Base
    #==============================================================================
    class Sprite_Base < Sprite

    #--------------------------------------------------------------------------
    # ● Dispose Animation
    #--------------------------------------------------------------------------
    alias mog_anti_lag_animation_dispose_animation dispose_animation
    def dispose_animation
    if $game_system.anti_lag_animation
    execute_animation_garbage
    return
    end
    mog_anti_lag_animation_dispose_animation
    end

    #--------------------------------------------------------------------------
    # ● Execute Animation Garbage
    #--------------------------------------------------------------------------
    def execute_animation_garbage
    $game_temp.animation_garbage = [] if $game_temp.animation_garbage == nil
    if @ani_bitmap1
    @@_reference_count[@ani_bitmap1] -= 1
    if @@_reference_count[@ani_bitmap1] == 0
    $game_temp.animation_garbage.push(@ani_bitmap1)
    end
    end
    if @ani_bitmap2
    @@_reference_count[@ani_bitmap2] -= 1
    if @@_reference_count[@ani_bitmap2] == 0
    $game_temp.animation_garbage.push(@ani_bitmap2)
    end
    end
    if @ani_sprites
    @ani_sprites.each {|sprite| sprite.dispose }
    @ani_sprites = nil
    @animation = nil
    end
    @ani_bitmap1 = nil
    @ani_bitmap2 = nil
    end

    end

    $rgss3_mog_anti_lag_animation = true

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12387
RMVXA 마우스 스크립트와 허걱님의 전체 키 한글 입력 스크립트 호환이 안되는 문제. 3 탐험가 2012.11.29 1030
RMVXA "그림의 이동"에 걸리는 시간을 변수로 대체할 수 있을까요? 3 file Roam 2012.11.26 1069
RMVXA 새 프로젝트에 기존 작업하던 것들은 복사 붙여넣기.....좀 간단히 할 수 없나요? 4 너무어려운알만툴 2012.11.25 806
RMVXA 특이하게 턴RPG를 구현해보고 싶은데요... 3 환장 2012.11.24 1191
RMVXA 타일셋 교체후 이동 불가. 8 최실장 2012.11.23 1597
RMVXA 폰트 변경 관련 질문 벌레신 2012.11.21 888
RMVXA 이벤트가 쓰러지지 않아요 ㅜ.ㅜ 2 file 최실장 2012.11.20 950
RMVXA 애니메이션 표시를 할 경우 짧은 멈춤(대기)현상이 발생합니다 3 리레크 2012.11.18 869
RMVXA 스크린 밖으로 밀려난 상태창 어떻게 해야되나요 file winspec 2012.11.18 824
RMVXA 퀘스트 스크립트를 8 종목의 퀘스트로 개조하려고 합니다. 2 file 탐험가 2012.11.18 5306
RMVXA 아이탬 타입 추가하고 싶은데 스크립트 어디를 건드려야하는건가요? 3 game 光 ㅋㅋ 2012.11.18 801
RMVXA 메뉴 스테이터스 스크립트 file winspec 2012.11.17 1349
RMVXA 콤보 히트시 감탄사 표현 file winspec 2012.11.17 6664
RMVXA 케릭이 안나와여ㅠㅠ 2 사용자 2012.11.17 1036
RMVXA 파티에 관한 것인데요 2 너굴너굴 2012.11.17 4695
RMVXA [해결] party HUD 최대 표시 갯수를 설정하고싶습니다 3 file winspec 2012.11.16 1170
RMVXA Khas Awesome Light Effects 스크립트 오류 3 file 쇼몬_아레하 2012.11.16 1146
RMVXA animated-battle 2 현사이 2012.11.15 929
RMVXA ACE 에서 기본폰트에 대해 질문드립니다. 3 쌀맨 2012.11.14 1252
RMVXA VX ace는 사이드뷰배틀이없나요? 2 WOL 2012.11.10 1234
Board Pagination Prev 1 ... 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 ... 149 Next
/ 149