じ☆ve冰风 发表于 2026-8-2 13:28:28

Show Animation Fix

Overview

So from my own experience + some threads a few months back, the show animation event command (or maybe animations as a whole) works a bit odd when the screen scrolls. The animation scrolls with the screen instead of staying on target, which is weird for non-screen animations.

Script

class Sprite_Basedef update_animation    return unless animation?    #We reset the origin so that it shows correctly    set_animation_origin   @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)      @animation.timings.each do |timing|          animation_process_timing(timing) if timing.frame == frame_index      end      else      end_animation      end    endendendNotesBetter put it above any other script, especially those that might be overwriting the same method.

Terms

Use it if you want, it's a simple "fix"


本贴来自国际rpgmaker官方论坛作者:Engr. Adiktuzmiko处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/show-animation-fix.24881/
页: [1]
查看完整版本: Show Animation Fix