Help with Timer Display

● ARCHIVED · READ-ONLY
Started by Fippy_Darkpaw 8 posts View original ↗
  1. Can anyone help me figure out if it is possible to add a 0 minute counter for this script by Ventwing?   I've got it working well now, aside from the fact that it is showing up as 9:9 pm instead of 9:09 pm.  Also the edge of the Day timer keeps getting cut off when the digits are at their longest, anyone know what value I have to modify so I can fit a couple extra digits in there as well?  

    Thanks in advance for your help.

    Code:
    #Wherever you see $game_switches[1]#Change 1 to the switch to turn the hud on/offclass Window_MapTime < Window_Base  def initialize    super(350,350,180,75)    @ampm = "AM"    @Days = "Day"    if $game_switches[1] == false      self.opacity = 0      time_draw    end  end  def time_draw    if $game_variables[100] == 1      @ampm = "PM"    else      @ampm = "AM"    end    @Days = $game_variables[98] #Days    @hours = $game_variables[97] # Hours    @mins = $game_variables[96] # Mins    text = @hours.to_s + ":" + @mins.to_s + " " + @ampm  + "  " + "Day: " + @Days.to_s    draw_text(0,0,200,50,text)  end  def update    if $game_switches[1] == false      contents.clear      time_draw    end    if $game_switches[1] == true      self.opacity = 255    end  endendclass Scene_Map < Scene_Base  alias time_draw_on_map_time create_all_windows  def create_all_windows    time_draw_on_map_time    @maptime_window = Window_MapTime.new  endend
  2. To get a couple more digits in there, an edit to the numbers in the super command should do it. I don't have the details in front of me on what those numbers do, but I think the first two numbers are the x, y location of it, and the next two are the width and height of the window? Try changing the 180 to say 240 and see if it works.

    I have no idea on the other question you asked though...maybe someone else can spot what is going on there.
  3. Thanks Science, but when I try your suggestion, I get;

    Script 'Time Display' line 24 : TypeError Occurred. can't convert nil into integer

    Not sure from that page you linked what I can change, I assumed it was the purple, but I couldn't find anything to match.


    Thanks for the advice Susan, I am using a time system that is based on variables right now that Patrick VanMackelberg created.  It works really well for my purposes and easily allows me to adjust the time scale.  If I can just get the time to show up properly, then get it to go away at the press of a button I'll be all set to get working!
  4. it's @mins, not @min

    Code:
    sprintf("%02d", @mins)
  5. That was it, thanks!
  6. As long as you get what you need, that's all that matters.

    Good luck! ^^