The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Scripts Database => Topic started by: modern algebra on February 20, 2010, 01:47:57 AM

Title: Animated Sprites In Menu
Post by: modern algebra on February 20, 2010, 01:47:57 AM
Animated Sprites instead of Faces
Version: 1.1
Author: modern algebra
Date: January 1, 2011

Version History



Description


This script allows you to draw an actor's sprite in any scene that already draws the actor's face. You can either use it to supplement the face graphic or replace the face graphic altogether. For each scene where you choose to use this feature, you can configure a number of options, such as where the sprite will show up (in relation to the face graphic), how big it will be, its opacity, whether or not the face will also be drawn, what pose the sprite will start in, whether it will be animated, whether it will change directions (and if so, over what time interval), and if subsequently drawn sprites should be drawn in a different pose.

Features


Screenshots

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg59.imageshack.us%2Fimg59%2F8850%2Fasf1.png&hash=8695170eafffc7b1febb9141047c1116a7f529cb)
Menu: Supplement face; Animated; Alternate Start Pose; Change Directions; X Offset +32
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg43.imageshack.us%2Fimg43%2F4564%2Fasf2.png&hash=599dea0f1a485aa579b95fe20af48b45e575e344)
Status: Remove face; Animated; Y Offset -24; Zoom 150

Instructions

Place this script in its own slot below Materials and above Main in the Script Editor (F11). For detailed instructions on configuration, see the EDITABLE REGION at line 30.

Script


Code: [Select]
#==============================================================================
#    Animated Sprites instead of Faces in scenes.
#    Version: 1.1
#    Author: modern algebra (rmrk.net)
#    Date: January 1, 2011
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#
#    This script allows you to draw an actor's sprite in any scene that already
#   draws the actor's face. You can either use it to supplement the face
#   graphic or replace the face graphic altogether. For each scene where you
#   choose to use this feature, you can configure a number of options, such as
#   where the sprite will show up (in relation to the face graphic), how big it
#   will be, its opacity, whether or not the face will also be drawn, what pose
#   the sprite will start in, whether it will be animated, whether it will
#   change directions (and if so, over what time interval), and if subsequently
#   drawn sprites should be drawn in a different initial pose.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    Place this script in its own slot below Materials and above Main in the
#   Script Editor (F11).
#
#    To add a scene and configure how the sprites will show up in it, read the
#   instructions in the EDITABLE REGION at line 30 very carefully.
#==============================================================================

ASF_CONFIGURATION = {
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#  EDITABLE REGION
#````````````````````````````````````````````````````````````````````````````
#  For each scene that you want the faces to be replaced (or supplemented) by
# sprites, set up an entry as follows (values are default), omitting any that
# you want to be default (pay attention to commas and curly brackets):
#
#    Scene_X => {
#      :x_offset => 0,
#      :y_offset => 0,
#      :zoom => 100,
#      :remove_face => false,
#      :default_start_pose => 0,
#      :alternate_start_pose => false,
#      :change_directions => false,
#      :direction_frames => 120,
#      :animate_sprites => false,
#      :move_speed => 4,
#      :opacity => 255,
#      :blend_type => 0,
#      :angle => 0,
#    },
#
#  where:
#    Scene_X ~ the name of the scene. eg Scene_Menu; Scene_Battle; Scene_Name
#    :x_offset ~ an integer, representing how many pixels left or right it
#      should be moved from the center of where the face would be drawn.
#      Positive numbers will be drawn right of that, and negative numbers drawn
#      left of that. If excluded, it defaults to 0.
#    :y_offset ~ an integer, representing how many pixels up or down it should
#      be moved from the bottom of where the face would be drawn. If negative,
#      it will be drawn higher and if positive, it will be drawn lower. If
#      excluded, it defaults to 0.
#    :zoom ~ an integer, representing percent zoom along the x axis. 100 is
#      100%, meaning it will be normal size. 200% would be twice its normal
#      size, etc... Defaults to 100
#    :remove_face ~ a boolean. If true, the face won't be drawn. If false, the
#      face will be drawn along with the sprite. Defaults to false.
#    :default_start_pose ~ an integer, 0-3. This is the starting pose of the
#      first drawn sprite. 0 => Down; 1 => Right; 2 => Up; 3 => Left. If
#      excluded, defaults to 0.
#    :alternate_start_pose ~ a boolean. If true, then each time a new sprite
#      is drawn, its start position will differ. So, if you have three actor
#      sprites are being drawn, and the default start pose is 0 (Down), then
#      the first sprite would start facing down, the second sprite would
#      start facing Right, and the third sprite would start facing Up. If
#      excluded, defaults to false
#    :change_directions ~ a boolean. If true, the sprites would change
#      over the time interval set in :direction_frames. If false, the sprites
#      will only face one direction for the duration of the scene. If excluded,
#      defaults to false
#    :direction_frames ~ an integer. If :change_directions is true, this
#      integer will determine the number of frames before the sprite changes
#      direction. 60 frames = 1 second. If excluded, defaults to 120.
#    :animate_sprites ~ a boolean. If true, the sprites will be shown walking.
#      If false, they will remain stationary. If excluded, defaults to false.
#    :move_speed ~ an integer, 1-6. If :animate_sprites is true, this is
#      the speed that the sprite will be animating. 1 is the slowest and 6 is
#      the fastest. Defaults to 4
#    :opacity ~ an integer between 0 and 255. This is a scale, with 0 being
#      totally transparent and 255 totally opaque. Defaults to 255.
#    :blend_type ~ Either 0, 1, or 2. 0 => normal, 1 => addition;
#      2 => subtraction. Defaults to 0 if excluded
#    :angle ~ an integer between 0 and 360. This corresponds to degrees on a
#      circle. For instance, 0 is rightside up, 180 is upside down, etc...
#      If excluded, defaults to 0.
#
#    If you get a syntax error when test playing your game, you most likely
#   forgot to put a comma or curly bracket in. If you set up entries for more
#   than one scene, you need to put a comma after each } except for the last
#   entry. For all of the attributes you specify in each scene entry, you need
#   a comma after the value except for the last entry.
#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  Scene_Menu => {
    :x_offset => 32,
    :y_offset => 0,
    :remove_face => false,
    :default_start_pose => 0,
    :alternate_start_pose => true,
    :animate_sprites => true,
    :move_speed => 1,
    :change_directions => true,
    :direction_frames => 120,
  },
  Scene_Status => {
    :x_offset => 0,
    :y_offset => -24,
    :zoom => 150,
    :remove_face => true,
    :default_start_pose => 0,
    :animate_sprites => true,
  },
#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#  END EDITABLE REGION
#////////////////////////////////////////////////////////////////////////////
}

#==============================================================================
# ** Bitmap
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new attr_accessor - asf_just_cleared
#    aliased method - clear
#==============================================================================

class Bitmap
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variable
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_accessor :asf_just_cleared
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Clear
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias mala_wlksprtmnu_clr_2gc1 clear unless self.method_defined? (:mala_wlksprtmnu_clr_2gc1)
  def clear (*args)
    mala_wlksprtmnu_clr_2gc1 (*args) # Run Original Method
    @asf_just_cleared = true
  end
end

#==============================================================================
# ** Game_Character
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Compatibility patch for Composite Characters
#==============================================================================

class Game_Character
  attr_writer :composite_character if self.method_defined? (:composite_character)
end

#==============================================================================
# ** Sprite_MenuActor
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  This window displays the walking sprite of an actor.
#==============================================================================

class Sprite_MenuActor < Sprite_Character
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize (actor_id, x, y, dir, config, viewport = nil)
    @frame_count = 0
    @change_direction, @asf_animation = config[:change_directions], config[:animate_sprites]
    @direction_frames = config[:direction_frames].is_a? (Integer) ? config[:direction_frames] : 120
    actor = $game_actors[actor_id]
    character = Game_Character.new
    # Set to composite character if that script exists.
    if character.methods.include? ("composite_character")
      character.composite_character = actor.composite_character
    else
      character.set_graphic (actor.character_name, actor.character_index)
    end
    super (viewport, character)
    self.x, self.y = x, y
    case dir
    when 1 then @character.turn_right
    when 2 then @character.turn_up
    when 3 then @character.turn_left
    end
    # Change sprite properties
    self.zoom_x = self.zoom_y = config[:zoom].to_f / 100.0 if config[:zoom]
    self.opacity = config[:opacity] if config[:opacity]
    self.angle = config[:angle] if config[:angle]
    self.blend_type = config[:blend_type] if config[:blend_type]
    # Change Speed and Frequency of the Sprite
    freq = config[:move_speed] ? config[:move_speed] : 4
    move_route = RPG::MoveRoute.new
    move_route.list.unshift (RPG::MoveCommand.new (29, [freq]))
    @character.force_move_route (move_route)
    update_bitmap
    update
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Frame Update
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def update
    # Turn at user-specified intervals
    if @change_direction
      if @frame_count >= @direction_frames
        @character.turn_right_90
        @frame_count = 0
      end
      @frame_count += 1
    end
    if @asf_animation
      @character.update_move
      @character.update_animation
    end
    update_src_rect
  end
end

#==============================================================================
# ** Window_Base
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased methods - initialize, update, dispose, draw_actor_face
#    new methods - dispose_walking_sprites
#==============================================================================

class Window_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias ma_asf_init_wlkng_7jk2 initialize
  def initialize (*args)
    @ma_walking_sprites = []
    ma_asf_init_wlkng_7jk2 (*args) # Run Original Method
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Dispose
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malgba_wlksprts_disps_5yu2 dispose
  def dispose (*args)
    @ma_walking_sprites.each { |sprite| sprite.dispose }
    @ma_walking_sprites.clear
    malgba_wlksprts_disps_5yu2 (*args) # Run Original Method
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Frame Update
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias mrnalb_sprtwlk_updt_7uj2 update
  def update (*args)
    # Dispose all sprites if bitmap recently cleared and new faces not drawn
    if self.contents.asf_just_cleared
      @ma_walking_sprites.each { |sprite| sprite.dispose }
      @ma_walking_sprites.clear
      self.contents.asf_just_cleared = false
    end
    # Check if contents have scrolled
    x_plus, y_plus = 0, 0
    if @asf_scroll_x != self.ox
      @asf_scroll_x = 0 unless @asf_scroll_x
      x_plus += (@asf_scroll_x - self.ox)
      @asf_scroll_x = self.ox
    end
    if @asf_scroll_y != self.oy
      @asf_scroll_y = 0 unless @asf_scroll_y
      y_plus += (@asf_scroll_y - self.oy)
      @asf_scroll_y = self.oy
    end
    @ma_walking_sprites.each { |sprite|
      sprite.update
      # Scroll if contents have scrolled.
      sprite.x += x_plus
      sprite.y += y_plus
      }
    mrnalb_sprtwlk_updt_7uj2 (*args) # Run Original Method
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Actor Face Graphic
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malg_drwactrface_spritereplce_6uj2 draw_actor_face
  def draw_actor_face(actor, x, y, size = 96, *args)
    # If scene is specified to replace the face graphic
    if ASF_CONFIGURATION.keys.include? ($scene.class)
      # Dispose all sprites if bitmap recently cleared
      if self.contents.asf_just_cleared
        @ma_walking_sprites.each { |sprite| sprite.dispose }
        @ma_walking_sprites.clear
        self.contents.asf_just_cleared = false
      end
      config = ASF_CONFIGURATION[$scene.class]
      malg_drwactrface_spritereplce_6uj2 (actor, x, y, size, *args) unless config[:remove_face]
      # Get offset
      x_off = config[:x_offset] ? config[:x_offset] : 0
      y_off = config[:y_offset] ? config[:y_offset] : 0
      sx = x + (size / 2) + x_off
      sy = y + size + y_off
      pose = config[:default_start_pose] ? config[:default_start_pose] : 0
      dir = config[:alternate_start_pose] ? @ma_walking_sprites.size % 4 : pose
      # Create Sprite
      viewport = Viewport.new (self.x + 16, self.y + 16, contents.width, contents.height)
      viewport.z = self.z + 50
      viewport.z += self.viewport.z if self.viewport
      sprite = Sprite_MenuActor.new (actor.id, sx, sy, dir, config, viewport)
      @ma_walking_sprites.push (sprite)
    else
      # Draw face if scene not affected
      malg_drwactrface_spritereplce_6uj2 (actor, x, y, size, *args)
    end
  end
end

Credit



Thanks


Support


Please post in this topic at RMRK.net for support. Please do not PM me, as any issues you may be having someone else will be having too, and I want them to see the solution.

Known Compatibility Issues

No known compatibility issues. Note, however, that it only works with scripts that use the Draw Actor Face method of Window_Base. The default scenes that do that are Scene_Menu, Scene_Status, Scene_Battle, and Scene_Name. It should work with custom scripts that use that method as well, but not with scenes that select faces directly (such as the message window of Scene_Map).

Author's Notes


If anyone wants me to add a feature so that it would work even in scenes where the regular draw_face (not draw_actor_face) method is called, I can. You suggest the implementation. I was thinking that for it, I would just use the name and index of the face graphic and call the character sprite from that. If you want it but think another implementation would be better, feel free to suggest one.


Creative Commons License
This script by modern algebra is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.
Title: Re: Animated Sprites In Menu
Post by: Onimusha on March 09, 2010, 12:09:22 PM
I've always wanted to do this, thanks!
Title: Re: Animated Sprites In Menu
Post by: Nathanael on April 27, 2010, 01:42:51 PM
Looks pretty nice.
Title: Re: Animated Sprites In Menu
Post by: Rexilia on April 29, 2010, 02:48:32 AM
Simple but very usefull. Thanks.
Title: Re: Animated Sprites In Menu
Post by: ASmitt on August 02, 2010, 05:35:58 AM
Very nice! Exactly what I wanted
However, there's a conflict with the Integrated Reserve Party code. When you take a character from the Active Party and put them into the Reserve, it causes the animated icons to move down one space, causing everything to look jumbled and confusing. But when I go to close the menu, they all snap back into their correct place. Also, when I move my MAIN character around in the Active party (as he is locked), they will snap back as well.

I'm not sure how hard this is to fix, but I would really appreciate it if you could help me out with this!!!
Title: Re: Animated Sprites In Menu
Post by: Fizzly on August 04, 2010, 04:08:34 PM
Nice little edit. I love every single one of your work, modern algebra! Keep it up!  ;D
Title: Re: Animated Sprites In Menu
Post by: Saschb2b on August 07, 2010, 10:47:20 PM
is there a way to integrate it in the MOG menu?
Would be awesome!
Copy&Paste = not working and self editing makes no changes
because MOG uses the Scene_Menu
Code: [Select]
##############
# Scene_Menu #
##############
class Scene_Menu 
and the "Scene_Menu is already configured in your script

Here's the part of mine edited script of MOG.
Perhaps you can find the line what makes it not
happen
Code: [Select]
##############
# Scene_Menu #
##############
class Scene_Menu   
  def main
    start                         
    perform_transition           
    Input.update                 
    loop do
      Graphics.update           
      Input.update             
      update                     
      break if $scene != self     
    end
    Graphics.update
    pre_terminate             
    Graphics.freeze               
    terminate                   
  end 
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end 
  def perform_transition
    Graphics.transition(0, "Graphics/System/BattleStart", 80)     
  end
  alias mog_start start
  def start
    mog_start
    @spriteset = Spriteset_Map.new
    #@menu_back = Plane.new   
    #@menu_back.bitmap = Cache.menu("Background")
    @menu_layout = Sprite.new 
    @menu_layout.bitmap = Cache.menu("Menu_Layout")
    @menu_layout.z = 301
    @menu_com = Sprite.new 
    @menu_com.bitmap = Cache.menu("Menu_Com01")
    @menu_com.bitmap = case @menu_index
    when 0 then Cache.menu("Menu_Com01") # Item
    when 1 then Cache.menu("Menu_Com02") # Status
    when 2 then Cache.menu("Menu_Com03") # Equip
    when 3 then Cache.menu("Menu_Com04") # Skill
    when 4 then Cache.menu("Menu_Com05") # Save   
    when 5 then Cache.menu("Menu_Com06") # Config
      else Cache.menu("Menu_Com01")
     end
    @menu_com.z = 302
    @menu_select = Sprite.new 
    @menu_select.bitmap = Cache.menu("Menu_Select00")
    @menu_select.z = 303
    create_command_window
    @gold_window = Window_Gold_Menu.new(70, 348)
    @gold_window.z = 304
    @status_window = Window_MenuStatus_Yui.new(100, 60)
    @playtime_window = Window_Time .new(165, -6)
    @mapname_window = Window_Mapname.new(30,-6)
    # Create @steps_window
    @steps_window = Window_Steps.new(320, 0)
    #Mineralien einbauen
    #@lusus_window = Window_lusus.new(-80,357)
    #@rohlusus_window = Window_rohlusus.new(20,357)
    #@rohgold_window = Window_rohgold.new(110,357)
    #@rohsilber_window = Window_rohsilber.new(200,357)
    #@rohkupfer_window = Window_rohkupfer.new(290,357)
    #@kohle_window = Window_kohle.new(380,357)
    #Enbau Ende
    @status_window.opacity = 0
    @playtime_window.opacity = 0
    @mapname_window.opacity = 0
    @gold_window.opacity = 0 
    #opacity of @steps_window
    @steps_window.opacity = 0
    #Mineralien einbauen
    #@lusus_window.opacity = 0
    #@rohlusus_window.opacity = 0
    #@rohgold_window.opacity = 0
    #@rohsilber_window.opacity = 0
    #@rohkupfer_window.opacity = 0
    #@kohle_window.opacity = 0
    #Enbau Ende
  end
  #def pre_terminate
  #end 
  alias mog_terminate terminate
  def terminate
    #mog_terminate
    @spriteset.dispose
    #@menu_back.dispose
    @menu_layout.dispose
    @menu_com.dispose
    @menu_select.dispose
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
    @playtime_window.dispose
    @mapname_window.dispose
    #Dispose @steps_window
    @steps_window.dispose
    #Mineralien einbauen
    #@lusus_window.dispose
    #@rohlusus_window.dispose
    #@rohgold_window.dispose
    #@rohsilber_window.dispose
    #@rohkupfer_window.dispose
    #@kohle_window.dispose
    #Enbau Ende   
  end
  def update
    #@menu_back.ox += 1
    @spriteset.update
    @command_window.update
    @gold_window.update
    @status_window.update
    @mapname_window.update
    #Update @steps_window
    @steps_window.update
    #Mineralien einbauen
    #@lusus_window.update
    #@rohlusus_window.update
    #@rohgold_window.update
    #@rohsilber_window.update
    #@rohkupfer_window.update
    #@kohle_window.update
    #Enbau Ende
    @playtime_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = "Das spiel der Alten" #Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.openness = 0
    @command_window.open
    @command_window.opacity = 0
    @command_window.contents_opacity = 0
    if $game_system.save_disabled             
      @command_window.draw_item(4, false)     
    end
  end
  def update_command_selection   
     case @command_window.index
     when 0
    @menu_com.bitmap = Cache.menu("Menu_Com01")
     when 1
    @menu_com.bitmap = Cache.menu("Menu_Com02")
     when 2
    @menu_com.bitmap = Cache.menu("Menu_Com03")
     when 3
    @menu_com.bitmap = Cache.menu("Menu_Com04")
     when 4
    @menu_com.bitmap = Cache.menu("Menu_Com05")
     when 5
    @menu_com.bitmap = Cache.menu("Menu_Com06")   
    end         
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0     
        $scene = Scene_Item.new
      when 1,2,3   
        start_actor_selection
      when 4       
        $scene = Scene_File.new(true, false, false)
      when 5     
        $scene = Velha_Game.new(0) #Scene_End.new
      end
    end
  end
  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @menu_select.bitmap = Cache.menu("Menu_Select00")
    @status_window.index = -1
  end
  def update_actor_selection   
     case @status_window.index
     when 0
    @menu_select.bitmap = Cache.menu("Menu_Select01")
     when 1
    @menu_select.bitmap = Cache.menu("Menu_Select02")
     when 2
    @menu_select.bitmap = Cache.menu("Menu_Select03")
     when 3
    @menu_select.bitmap = Cache.menu("Menu_Select04")
    end
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1
        $scene = Scene_Skill.new(@status_window.index)
      when 2   
        $scene = Scene_Equip.new(@status_window.index)
      when 3 
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end
Title: Re: Animated Sprites In Menu
Post by: modern algebra on August 07, 2010, 11:14:00 PM
Well, it only works on windows. MOG uses sprites.

@Asmitt - yeah, it wouldn't work with windows that scroll I shouldn't think. I might make a patch for that at some future time.
Title: Re: Animated Sprites In Menu
Post by: modern algebra on January 01, 2011, 04:46:20 PM
Updated to v. 1.1. Added new features to control zoom, opacity, blend type, and angle.
Title: Re: Animated Sprites In Menu
Post by: DBZinsanity on July 23, 2011, 03:09:32 AM
This is excellent, It is compatable with the visual gear!!!