Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: ForeverZer0 on August 29, 2011, 06:56:28 pm

Title: Appidcloud's Help with Viewport Z
Post by: ForeverZer0 on August 29, 2011, 06:56:28 pm
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.
Title: Re: Appidcloud's Help with Viewport Z
Post by: Apidcloud on August 30, 2011, 12:31:14 pm
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