Day Night Cycle issue
Hey again everyone.
I have been working on Day and Night Cycles in my game ( @jamie_c I used one of your tutorials so maybe you could shed some light) http://www.jamie-cross.net/?portfolio=gamesalad-full-screen-effects-tutorialdemo-blood-edge-daynight-cycle-night-vision-broken-glass-and-spotlight#.V2DB1lfYdEw
My game is based on Day and Night Cycles. The goal is for the hero to spend more time in the day than the night ( things happen at night that slows down the hero mission)
My day cycle is about 5 min, but the hero can add time to this by picking up items. But sooner or later the timer will hit 0 and nighttime comes.
So right now I have a progress bar/timer. Once it hits 0, the night fades in, and will not get light again until certain Items are picked up.
This works great on the current scene......but when I leave the scene and go to the next scene, the night time fades in again. I don't want it to fade in once it has already entered the night cycle. I only what it to fade in or out when I go from Day to Night or Night to Day and not fading when switching scene during the night cycle.... Make sense?
game.nighttime is triggered when the progress bar hits O, game.daytime is triggered when the Progress bar is 1 or more
Here are my rules
Rule 1 ( Start Night)
if game.nighttime is true
Self.Color.Red to 0.2 ( Duration 5) Function Linear
Self.Color.Green to 0.2 ( Duration 5) Function Linear
Self.Color.Blue to 0.2 ( Duration 5) Function Linear
game.day to true.
Rule 2 ( Start Day)
if game.daytime is true
Self.Color.Red to 1 ( Duration 5) Function Linear
Self.Color.Green to 1 ( Duration 5) Function Linear
Self.Color.Blue to 1 ( Duration 5) Function Linear
game.night time to true.
I am sure this is a simple fix, but I have not been able to figure out the logic to make it happen.