Day/Night System - Sistema Giorno/Notte
Pagina 1 di 1
Day/Night System - Sistema Giorno/Notte
- Nome: Internal Clock controlled Day/Night system
- Autore: Leon_Westbrooke
- Versione: N/D (Unica)
Descrizione
Ecco uno script che permette di avere un sistema Giorno/Notte seguendo l'orologio interno del proprio PC.
Può essere utile per i classici Eventi Notturni, per dare un po' di realismo o per creare degli eventi segreti/easter eggs che si attivano solo ad un certo orario reale.
Istruzioni
Inserite lo script sopra Main ma sotto agli altri script.
Per far funzionare lo script, creare un evento in Processo Parallelo ed articolarlo in questo modo:
Per cambiare la tinta in una mappa, assicuratevi di impostare l'inizio del Processo Parallelo su Switch, e mettete in OFF la switch selezionata.
Script
Screen
N/D
- Autore: Leon_Westbrooke
- Versione: N/D (Unica)
Descrizione
Ecco uno script che permette di avere un sistema Giorno/Notte seguendo l'orologio interno del proprio PC.
Può essere utile per i classici Eventi Notturni, per dare un po' di realismo o per creare degli eventi segreti/easter eggs che si attivano solo ad un certo orario reale.
Istruzioni
Inserite lo script sopra Main ma sotto agli altri script.
Per far funzionare lo script, creare un evento in Processo Parallelo ed articolarlo in questo modo:
# Switch[3] == ON
# Loop
# Script... Check_Time.new
# Wait 1 frame
# End Loop
Per cambiare la tinta in una mappa, assicuratevi di impostare l'inizio del Processo Parallelo su Switch, e mettete in OFF la switch selezionata.
Script
- Spoiler:
- Codice:
#===============================================================================
# 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
Screen
N/D
JillChelsea- Data d'iscrizione : 15.07.11
Età : 25
Località : Sessa Aurunca (CE)
Argomenti simili
» [2k3] - Sistema di corsa ad eventi -
» Sapphire Action System IV
» Enemy Detection System
» Suoni diversi nello shop system
» Sapphire Action System IV
» Enemy Detection System
» Suoni diversi nello shop system
Pagina 1 di 1
Permessi in questa sezione del forum:
Non puoi rispondere agli argomenti in questo forum.
|
|