Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Kerberos

How to make a custom message window with Ruby Scripting and other things

Question

I want to know how to show a custom message window in rpgmaker xp using ruby scripting but I only got this far with the script but it doesn't show the map which I want to show when showing a message !

 

class MyCustomWindow < Window_Base
 #----------------------------------------------------------------------
 # * Object Initialization
 #----------------------------------------------------------------------
 def initialize
   super(0, 0, 640, 99)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.draw_text(0, 0, 644, 88, "A ERROR HAS BEEN ENCOUNTERED AND THE PROGRAM NEEDS TO CLOSE")
   self.contents.draw_text(0, 0, 644, 77, "A ERROR HAS BEEN ENCOUNTERED AND THE PROGRAM NEEDS TO CLOSE")
   self.contents.draw_text(0, 0, 644, 66, "A ERROR HAS BEEN ENCOUNTERED AND THE PROGRAM NEEDS TO CLOSE")
   self.contents.draw_text(0, 0, 644, 55, "A ERROR HAS BEEN ENCOUNTERED AND THE PROGRAM NEEDS TO CLOSE")
 end

  def refresh
 self.contents.clear
  self.contents.font.color = normal_color
  self.contents.font.size = 20
 end

end

#==============================================================================
# * Scene_ShowWindow
#==============================================================================

class Scene_ShowWindow
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
  def main
   #call the window
   @window = MyCustomWindow.new
   # Execute transition
   Graphics.transition
   # Main loop
   loop do
     # Update game screen
     Graphics.update
     # Update input information
     Input.update
     # Frame update
     update
     # Abort loop if screen is changed
     if $scene != self
       break
    end
   end
   # Prepare for transition
   Graphics.freeze
   # Dispose of windows
   @window.dispose
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # Update windows
   @window.update
 end
end

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Can you be more specific on what you want this window to do?

Just to show a basic message of what a character is saying maybe edit it to add more effects later but basicly to show a message on map without the default limitations ...

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...