Will you be resetting EarthTimer when it gets to 2400 (24 hours), or will it continue ticking/increasing?
Should I make a tutorial on that one too?
I guess he will reset it.
It would reset.
I’ve deleted the above events. I just need help now from scratch to make this thing work.
Should I make a video on how to implement it by using this method:
Yes, that would be very helpful sir.
Remember, I do need it to align with a clock format.
Here’s a way of doing it using a tween. It does means creating a dummy object.
First, create a sprite object (I named mine TweenObject) with no image, and add to it an object variable named “OpacityOfTheNight” with a value of 0.
Next add a tween behaviour to the object. Then place an instance of the new object in the scene.
Finally use the following code to cause the dimming:
You mean, implementing it with clock format?
If you want to change the intensity value of the Dark Night effect, use “intensity” - lower case and in quotes - like I had for opacity in my screen snip above, and with a value between 0 and 1.
So when the tween finishes, will it remain a constant dim?
If so, how would I tween it to undim it after a certain amount of seconds and have this whole event on repeat?
Yes that is what I mean.
Yes.
Pretty much the same as dimming it, but reverse the values and give it another name. Have a condition where EarthTime > 1700 seconds (5am game time if 800 seconds is 8pm game time), and action to add another tween, but one that goes from 1 to 0 with a name like “MorningLight”.
It will repeat, ad infinitum. Since EarthTime resets, at some point it’s value will be less 800 seconds. That’s when the “EarthTime is > 800 seconds” condition will be false and the whole process will repeat once EarthTime exceeds 800 seconds.
Confused with this part. How do I add an object variable to a sprite object?
It’s good but confusing.
The confusing part for me is that there is another text object in there which changes to This is a Tutorial.
In the scene editor, click on the 3 vertical dots beside the object. Then select Edit Object Variables, and add the variable there.
That’s a gradual change over 60 seconds. I suggest you test it out with a 6,000ms time for the tween (not 60,000). The the change should be more apparent.
Even changed to 6000ms doesn’t work.
Where are you declaring EarthTime in this test project? Create it with a start of scene condition.