|
| 21 Jun 2012 09:27 PM |
I'm making a complicated Day/Night script, just for fun. I want it to change the time of day every second, as in
00:00:01 wait(0.1) 00:00:02
And that will take forever. Any way to get around this using some groovy math?
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 21 Jun 2012 09:30 PM |
| Loops that add 1 second for every iteration |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2012 09:31 PM |
Aww....
I wanted to use math qq
Well, what type of loop should I use?
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 21 Jun 2012 09:32 PM |
while wait(1) do game.Lighting:SetMinutesAfterMidnight(game.Lighting:GetMinutesAfterMidnight() + 1) end |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2012 09:33 PM |
Doesn't that cause the skybox to move like a stop motion movie? I literally want it to change the TimeOfDay for every second, to make it ultra-realistic...
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 21 Jun 2012 09:36 PM |
| You can even change the wait from 1 to .1 and I'm pretty sure you will not even notice the movement of the sun until several seconds later. |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2012 09:37 PM |
So you're saying that either way, the skybox is going to look like crap, basically?
if that_statement == true then ScriptingHelpers.GreenDay987 = Sad else ScriptingHelpers.GreenDay987 = Happy
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2012 09:38 PM |
SH is so slow right now .-.
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 21 Jun 2012 09:40 PM |
if that_statement == true then ScriptingHelpers.GreenDay987 = Sad else ScriptingHelpers.GreenDay987 = Happy end <--Forgot this |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2012 09:41 PM |
:o
lol
Anyway, would it just work better to change the skybox second by second >_>
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 21 Jun 2012 09:41 PM |
| No, what I'm saying is that the sun will move really slowly which will look as realistic as you want. |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2012 09:41 PM |
Oh ok.
Thanks :D
By the way, sorry for being off-topic, but any idea what ambiance is?
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2012 09:42 PM |
Ambience
xD Spellcheck
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 21 Jun 2012 09:43 PM |
| It changes the color of the global lighting in Workspace. |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 21 Jun 2012 09:44 PM |
| Ambiance is the color that is spread across the map. Usually its just a midgrayish color. Sometimes people change it to like red or something for a more apocalyptic feel and such. |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2012 09:44 PM |
Ah... ok.
So how would I access it via script? I would like to change it according to the time of day.
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2012 10:17 PM |
My god.... I tried Spectrum's script out, and it was so slow, I barely saw the sun move at all.
I think the Time changed by 6 second intervals, that's enough for me. Thanks.
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 21 Jun 2012 10:19 PM |
game.Lighting.Ambiance = Color3.new(math.random(), math.random(), math.random())
|
|
|
| Report Abuse |
|
|
|
| 21 Jun 2012 10:20 PM |
Alrighty, thanks.
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
Ubayla
|
  |
| Joined: 01 Dec 2008 |
| Total Posts: 157 |
|
|
| 21 Jun 2012 11:22 PM |
| You could always change the time to the internal clock... But that would be too fun. |
|
|
| Report Abuse |
|
|