Code:
#==============================================================================
# ** Minichars by Charlie Fleed
#
# Version: 1.01
# Author: Charlie Fleed
#==============================================================================
MINICHARS=["char_kurea_02","char_rein_02","char_safi_02"]
#==============================================================================
# ** Sprite_Character
#------------------------------------------------------------------------------
class Sprite_Character < RPG::Sprite
attr_accessor :shifted
end
#==============================================================================
# ** Spriteset_Map
#------------------------------------------------------------------------------
class Spriteset_Map
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias minichars_initialize initialize
def initialize
# Original call
minichars_initialize
for sprite in @character_sprites
if $game_temp.in_world_map and MINICHARS.include?(sprite.character.
character_name)
sprite.zoom_x=0.7
sprite.zoom_y=0.7
sprite.oy+=10
sprite.shifted=true
else
sprite.zoom_x=1
sprite.zoom_y=1
end
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
alias minichars_update update
def update
# Original call
minichars_update
for sprite in @character_sprites
if $game_temp.in_world_map and MINICHARS.include?(sprite.character.
character_name)
sprite.zoom_x=0.7
sprite.zoom_y=0.7
sprite.oy+=10 unless sprite.shifted == true
sprite.shifted = true
else
sprite.zoom_x=1
sprite.zoom_y=1
end
end
end
end
#==============================================================================
# ** Game_Temp
#------------------------------------------------------------------------------
class Game_Temp
attr_accessor :in_world_map
end
#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
class Game_Map
alias minichars_setup setup
def setup(map_id)
minichars_setup(map_id)
# Support for mini-chars in world map
if is_world_map()
$game_temp.in_world_map=true
else
$game_temp.in_world_map=false
end
end
def is_world_map()
for id in 0..@events.length
if @events[id]!=nil
if @events[id].event.name=="world map"
return true
end
end
end
return false
end
end
#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
class Game_Event
attr_reader :event
end