Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Animation Bug Fixed
#1
Animation Bug Fixed
by Woratana
Release Date: 21/05/2008


Introduction
I'm not sure how many people noticed that...

when you show animation on character,
and you move in the map that bigger than 17 x 13 which cause map to scroll.
The animation will move with the screen, instead of stay on character.

So I scripted this one to fixed it~


Screenshots
No need...


Script
Place it above main
[Image: 25thhqt.jpg]
Code:
#=========================================================================
# ? ? [VX] Animation Bug Fixed ? ? by Woratana (21/05/2008)
# * Fixed bug that animation will follow screen, not stay on character~ *
# * You can place this script in any slot below the slot 'Sprite_Base'
#-------------------------------------------------------------------------
class Sprite_Base < Sprite
  alias wora_bugfix_sprbas_upd update
  def update
    if !@animation.nil?
      if @animation.position == 3
        if viewport == nil
          @animation_ox = Graphics.width / 2
          @animation_oy = Graphics.height / 2
        else
          @animation_ox = viewport.rect.width / 2
          @animation_oy = viewport.rect.height / 2
        end
      else
        @animation_ox = x - ox + width / 2
        @animation_oy = y - oy + height / 2
        if @animation.position == 0
          @animation_oy -= height / 2
        elsif @animation.position == 2
          @animation_oy += height / 2
        end
      end
    end
    wora_bugfix_sprbas_upd
  end
end


Instruction
You can place this script in any slot below the slot 'Sprite_Base' ;)


Author's Notes
Free for use in your work~
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Animation : Ground Kain Nobel 1 4,716 01-12-2012, 08:33 AM
Last Post: yamina-chan
   Victor Engine - Loop Animation Victor Sant 0 4,133 01-01-2012, 02:23 PM
Last Post: Victor Sant
   Victor Engine - Fixed Parallax Victor Sant 0 4,209 12-21-2011, 07:52 AM
Last Post: Victor Sant
   Victor Engine - Cast Animation Victor Sant 0 4,088 12-21-2011, 07:48 AM
Last Post: Victor Sant
   Message Shutter Animation Myownfriend 9 12,710 04-06-2010, 11:14 AM
Last Post: Ace
   Auto-Repeat Animation woratana 0 4,068 01-22-2009, 01:10 PM
Last Post: woratana
   Battle Animation 'Flip' Control DerVVulfman 0 4,617 03-05-2008, 06:45 AM
Last Post: DerVVulfman



Users browsing this thread: