I'm using a script that shows a window when i call it...
The only problem is that it takes 20 seconds before the window disappears once called. Can someone edit this so: the window will disappar after 5 seconds, or if menu or battle is entered?
Here is the script:
Ps: I forgot who the author was, if someone know they are welcome to post it. Oh! And I have done some minor edits..
The only problem is that it takes 20 seconds before the window disappears once called. Can someone edit this so: the window will disappar after 5 seconds, or if menu or battle is entered?
Here is the script:
Code:
#==============================================================================
# â–¦nbsp; Place_Window
#------------------------------------------------------------------------------
#  To place a window at the top left of the screen showing your location
# in the game by name, and an icon.
#==============================================================================
class Place_Window < Window_Base #Uses Window_Base's variables
attr_accessor :text #Defines text
attr_accessor :icon #Defines which icon to use
def initialize(text, icon) #Stores the text to print in the variable, "text"
#Draws a window at position 0,0 with a width of the # of chars in text
#times 14, and a height of 55
super(0, 0, text.size*12+32, 55)
#Creates a Bitmap viewport without any arrows (removing the -32's shows arrows)
self.contents = Bitmap.new(width-32, height-32)
#Sets the font's face to Times New Roman
self.contents.font.name = "Tahoma"
#Sets the font's size to 20
self.contents.font.size = 22
#Sets the opacity of the background of the window to 160
self.back_opacity=50
bitmap = RPG::Cache.icon(icon)
self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24))
#Draws the text inside the variable, "text" within a viewport with the
#dimensions of the number of characters in text times 14, and the
#height of 20 pixels tall; all at locaiton 0,0
self.contents.draw_text(32, 0, text.size*12+32, 20, text)
end
end
Ps: I forgot who the author was, if someone know they are welcome to post it. Oh! And I have done some minor edits..