Hey guys, I have next to no knowledge of scripting, and just wanted to make a quick little script that displays the current date after my hero rests / checks the calendar.
I have everything set up, but I don't know how to display the window only for a few seconds, and then remove it.
Currently it just displays for a short time and then is removed on its own (I assume after something is refreshed or whatever?)
Here is my pathetic little script, I assume there is something I could just throw in at the end to dispose the window after x frames or something?
CODE
class Calendar < Window_Base
def initialize
super(0, 0, 200, 120)
self.contents = Bitmap.new(width - 32, height - 32)
date = $game_variables[4]
year = $game_variables[9]
if $game_variables[18] == 1
weekday = "Monday"
elsif $game_variables[18] == 2
weekday = "Tuesday"
elsif $game_variables[18] == 3
weekday = "Wednesday"
elsif $game_variables[18] == 4
weekday = "Thursday"
elsif $game_variables[18] == 5
weekday = "Friday"
elsif $game_variables[18] == 6
weekday = "Holiday"
else
weekday = "Nil"
end
self.contents.font.size = 20
self.contents.draw_text(0, 0, 200, 32, "Today's Date is:")
self.contents.draw_text(0, 20, 200, 32, weekday)
self.contents.draw_text(0, 40, 30, 32, "Day")
self.contents.draw_text(35, 40, 25, 32, date.to_s)
self.contents.draw_text(0, 60, 40, 32, "Year")
self.contents.draw_text(45, 60, 25, 32, year.to_s)
end
end
Any help would be much appreciated.
This post has been edited by superafroboy: Oct 15 2011, 07:14 AM