Appidcloud's Help with Viewport Z

Started by ForeverZer0, August 29, 2011, 06:56:28 pm

Previous topic - Next topic

ForeverZer0

class Scene_Title
 
  alias zer0_main main
  def main
   
    bitmap = Bitmap.new(640, 480)
    bitmap.fill_rect(0, 0, 640, 480, Color.new(128, 128, 255))
    viewport = Viewport.new(0, 0, 640, 480)
   
    viewport.z = 90 # Behind window
    #viewport.z = 120 # Above window, and you can't see the window
   
    sprite = Sprite.new(viewport)
    sprite.bitmap = bitmap
   
    zer0_main
   
    [bitmap, sprite, viewport].each {|obj| onj.dispose }
  end
end


This works, 100% guaranteed.  If it doesn't, you have another script screwing stuff up.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Apidcloud

I get it now XD
I was using 100 as viewports's z and it didn't work although I changed window's z to less than 100 :P

Thanks
Instead of wanting to be somebody else, rather become somebody else



"I will treasure the knowledge like a squirrel treasures acorns."


Gibbo Glast 2D Engine - The sky is no longer a limit