질문과 답변

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 21162
이벤트 작성 RMVXA 이벤트 1 에이에스디에프 2021.08.11 52
RMVXA 이벹트 질문 1 마하반야 2021.05.08 53
에러 해결 RMVXA vx ace 정상적인 작동이 안됩니다 바퀴벌레의질긴생명력 2020.07.17 55
스크립트 사용 RMVXA 다음 맵으로 넘어갈때 원경 고정 풀리게 하는법좀요 도르마무 2020.03.10 55
스크립트 사용 RMVXA 턴제전투 끝나고 나오는 이벤트에서 SE 오류 유리컵 2020.03.30 56
스크립트 작성 RMVXA 스킬의 일괄 삭제와 특정 변수 값을 가진 스킬을 배우게 하고 싶습니다 김탲누 2020.05.11 59
에러 해결 RMVXA 탈 것에 내리면 캐릭터가 투명이 됩니다. objuan 2019.08.26 59
기타 RMVXA 메시지 출력 부분 x좌표를 변경하고싶어요! file 당고당고 2020.08.07 61
스크립트 사용 RMVXA 전투중 적이 누구를 노리는지 미리 알수 있는 스크립트가 있을까요 겜만들고싶다앙 2021.04.10 62
스크립트 사용 RMVXA 스킬레벨 스크립트 어떻게 사용하는건지 이해를 못하겠습니다.. 도와주세요 ㅠㅠ Redkanes 2020.03.30 63
이벤트 작성 RMVXA 스위치가 꺼질 경우 이미지를 끄게 하고 싶습니다. 1 Payroy 2024.01.05 64
이벤트 작성 RMVXA 스톱워치 하는 법 3 홍홍이1 2023.09.16 64
이벤트 작성 RMVXA 이벤트 내용 일괄 선택은 불가능한가요? 2 file zx히어로zx 2022.10.30 66
스크립트 사용 RMVXA 전투화면 내에서 게이지바를 이동시키고 싶어요! file 미맛 2021.09.29 66
스크립트 사용 RMVXA VXACE에서 2방향, 4방향의 동시 사용 믕믱이 2019.07.22 67
스크립트 사용 RMVXA VXA에서 그림표시 제한을 늘리는 스크립트를 구할수 있을까요? 티안타 2021.09.08 68
스크립트 작성 RMVXA VXA 능력치 체크하는 스크립트가 따로 있나요? 2 Maketh 2019.12.19 71
RMVXA 이벤트를 이용해 특정 스킬 사용시 추가 데미지를 주고 싶습니다. tricheur 2016.12.08 72
기타 RMVXA ace pc 빌드 방법 2 배be 2020.05.11 72
스크립트 사용 RMVXA 전투 개시시 상태 부여 스크립트 질문 AAAA. 2023.11.14 72
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 150 Next
/ 150