lol i was just giving an example with sprites and bitmaps, and that was just for pinting out some facts. ^^ This would not work well indeed.
And, well, SS and Trickster had explained almost all things. But i want just to add some more ideas, based on SS´s suggestion ^^
class Scene_Map
attr_accessor :sprites
alias old_linkint_big_alias_lol_scene_map_main main
def main
@sprites = {}
old_linkint_big_alias_lol_scene_map_main
@sprites.values.each {|sprite| sprite.dispose if !sprite.disposed?}
end
alias old_linkint_big_alias_lol_scene_map_update update
def update
old_linkint_big_alias_lol_scene_map_update
@sprites.values.each {|sprite| sprite.update if !sprite.disposed?}
end
end
# A la SS xD
That way, in map you could just call:
sprite = Sprite.new
$scene["your_sprite_name"] = sprite
$scene["your_sprite_name"].z = 9999
# And so on...
# You can use numbers too, if you think it´s better
$scene[0] = Sprite.new
$scene[0].bitmap = RPG::Cache.battler("001-Fighter01", 0)
Hope you got it.
P.S. 1: Man/Woman? What do i appear to be? lol
P.S. 2: BTW
this is the post i wrote explaining the concepts of sprites and bitmaps, and in that case i really forgot about the GC issue, so... sorry ^^
P.S. 3: Sometimes i worry more on explaining how things happens than solving people´s problems. I should´ve posted a good solution for you since the beginning. Sorry for not being so helpful before kaboom xD