Leon 55 Report post Posted January 25, 2009 Just read the header of the script, it will say everything. #=============================================================================== # Check_Time, By Leon_Westbrooke #------------------------------------------------------------------------------- # Details: # Will automatically change the tint of maps that it is called on based on # the computer's internal clock. # # Instructions: # Place script above main, but below other default scripts. # On each map you want the tint set by this script, make an event as follows: # [Parallel Process Event] # Turn on switch 3 # Loop # Script... Check_Time.new # Wait 1 frame # End Loop # # Notes: # You must set a switch to change this parallel process if you wish to change # the tint of the screen on that map. # #=============================================================================== class Check_Time def initialize @time_stamp = Time.new if $game_switches[3] == false if @time_stamp.strftime("%H").to_i < 6 or @time_stamp.strftime("%H").to_i > 20 red = -100 green = -100 blue = -90 $game_screen.start_tone_change(Tone.new(red, green, blue, 20), 120) elsif @time_stamp.strftime("%H").to_i > 5 and @time_stamp.strftime("%H").to_i < 9 red = -60 green = -42 blue = -60 $game_screen.start_tone_change(Tone.new(red, green, blue, 15), 120) elsif @time_stamp.strftime("%H").to_i > 8 and @time_stamp.strftime("%H").to_i < 18 red = 0 green = 0 blue = 0 $game_screen.start_tone_change(Tone.new(red, green, blue, 0), 120) elsif @time_stamp.strftime("%H").to_i >17 and @time_stamp.strftime("%H").to_i < 21 red = -40 green = -60 blue = -60 $game_screen.start_tone_change(Tone.new(red, green, blue, 15), 120) end else if @time_stamp.strftime("%H").to_i < 6 or @time_stamp.strftime("%H").to_i > 20 red = -100 green = -100 blue = -90 $game_screen.start_tone_change(Tone.new(red, green, blue, 20), 0) $game_switches[3] = false elsif @time_stamp.strftime("%H").to_i > 5 and @time_stamp.strftime("%H").to_i < 9 red = -60 green = -42 blue = -60 $game_screen.start_tone_change(Tone.new(red, green, blue, 15), 0) $game_switches[3] = false elsif @time_stamp.strftime("%H").to_i > 8 and @time_stamp.strftime("%H").to_i < 18 red = 0 green = 0 blue = 0 $game_screen.start_tone_change(Tone.new(red, green, blue, 0), 0) $game_switches[3] = false elsif @time_stamp.strftime("%H").to_i >17 and @time_stamp.strftime("%H").to_i < 21 red = -42 green = -60 blue = -60 $game_screen.start_tone_change(Tone.new(red, green, blue, 15), 0) $game_switches[3] = false end end end end Share this post Link to post Share on other sites
Polraudio 122 Report post Posted January 25, 2009 This is very helpful Leon Thank you very much. This will expand my RGSS knowledge more. Share this post Link to post Share on other sites
Wyzrd 12 Report post Posted January 26, 2009 This could be a really good script if put to use the right way. Share this post Link to post Share on other sites
Imanton 0 Report post Posted December 22, 2013 i know i'm a little late, but why do i need to use switch 3 if the only difference n the script is that it turns it off? Share this post Link to post Share on other sites
Anirban 0 Report post Posted December 28, 2013 I tried it, and its working good..but is it necessary to the loops??... Share this post Link to post Share on other sites