Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
Sign in to follow this  
Jambo6c

[XP]Time of Day

Recommended Posts

Hi everbody!

 

I need a script that will change the screen tone (or something else that will work in the same way) so that I can display daytime, dusk, nighttime, dawn, then this repeats. Either triggered by the time or at points in the game where I can just put in an event to change it to a chosen time of day (or night) - the latter would be preferrable...and possibly easier...

 

Anyway, thanks in advance!

 

James

Share this post


Link to post
Share on other sites

That's almost exactly what I was after!!!

 

One thing though - in the instructions it's telling me I need to configure some values and do some scripting in 'Game_DDNS' and 'Bitmap' etc. but I can't find these categories in the Script Editor.

 

Little help? :D:D:D

 

Thanks

Share this post


Link to post
Share on other sites

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

DAY = 1 # switch ID of the "day" switch
NIGHT = 2 # switch ID of the "night" switch
INSIDE = 3 # switch ID of the "inside" switch
OUTSIDE = 4 # switch ID of the "outside" switch
INSIDEDARK = 5 # switch ID of the "inside dark places" switch
DAY_VAR = 1 # variable ID of the "day counter"
NIGHT_VAR = 2 # variable ID of the "night counter"
MAX_DAY = 120 # duration of a day in seconds
MAX_NIGHT = 90 # duration of a night in seconds
DYN_DAY = false # allow dynamic shortening and prolongening of day
DYN_NIGHT = false # allow dynamic shortening and prolongening of night
DAY_INT = 3 # variation of day in seconds
NIGHT_INT = 2 # variation of night in seconds
MINUTES = true # if dynamic day and night are turned off show minutes on clock
SHOW_CLOCK = true # set to false to remove the clock from the map

This is what you will need to edit.

 

You will have to set what switches and variables are used by the system here

DAY = 1 # switch ID of the "day" switch
NIGHT = 2 # switch ID of the "night" switch
INSIDE = 3 # switch ID of the "inside" switch
OUTSIDE = 4 # switch ID of the "outside" switch
INSIDEDARK = 5 # switch ID of the "inside dark places" switch
DAY_VAR = 1 # variable ID of the "day counter"
NIGHT_VAR = 2 # variable ID of the "night counter"

 

Everything you need is in the top part of the script.

You will have to use call script's like they say(Last event in the last events tab)

Share this post


Link to post
Share on other sites

I don't do this for everyone, but here is one of my 'Secret Scripts'. I will post this too, everybody!

#===============================================================================
#  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

@ Leon

That is one insanely-awesome script and thanks for giving me one of your secret scripts, but I'm after one I can adjust myself at certain points. Still looks awesome though!

 

@ Polraudio

Ahhhh, I think I gotcha now!!!

 

Ruling out any edits to this post in the next couple days thanks for all the input guys!

Share this post


Link to post
Share on other sites

Throught night and day, life is a struggle. Light the candlesticks by night and blow out the flame by morning.

Without a magic in us, this would not happen. This magic, is called scripting and Leon, you are one of those magical people.

Share this post


Link to post
Share on other sites
@ Leon

That is one insanely-awesome script and thanks for giving me one of your secret scripts, but I'm after one I can adjust myself at certain points. Still looks awesome though!

 

Doh! Well I'll pinch this then mmmwahhahahaha. ...ok I'll give credit.

 

P.S. MagicKid, get a grip!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...