- 0
7 answers to this question
Recommended Posts
This topic is now closed to further replies.
Sign in to follow this
Followers
0
-
Recently Browsing 0 members
No registered users viewing this page.
So, after scouring the web for any way to make what I needed possible,
I started looking at all the scripting tutorials that are on this site.
Great stuff, but now it seems like I have hit a snag, well a couple of them.
1. I tried to make this clock appear in the upper right corner of the screen
and can be viewed at all times without having to call the scene specifically.
Like a HUD sort of. But it wont display like a hud, instead more a menu.
2. I am trying to get in-game variables to be called within the clock script
that allows it to display/update them on the clock as they change. However,
I cant seem to manage to get them to display.
I must be doing something wrong, so if anyone could point out to me what it
is, I would be grateful. I will attach my first attempt at a script from
scratch, and hopefully someone can figure it out.
class DateWindow < Window_Base def initialize super(525,0,115,96) @window = DateWindow.new @timer_min = $game_variables[7] @timer_hour = $game_variables[8] @timer_day = $game_variables[9] @timer_month = $game_variables[10] @timer_year = $game_variables[11] self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear self.contents.font.color = normal_color self.contents.font.size = 16 self.contents.draw_text(0,0,100,32,"timer_hour:timer_min") self.contents.draw_text(0,32,100,32,"timer_month/timer_day/timer_year AZ") end end class Scene_ShowWindow def main Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @window.dispose end def update @window.update end endLines 5-9 are my attempts at turning the game variables into local variables.
Meanwhile, Lines 18 and 19 are where I am trying to display them within the window.
Again, thanks. I know I'm a pain. :B):
Share this post
Link to post
Share on other sites