|
| 30 Sep 2011 11:11 PM |
So, I have been planning a small script; a slow-ish day to night script, with brightness, and ambient occurences. I have it all planned out except for the ambient. Every way I've tried, it has either failed, or glitched out (Every time it glitched out, it would make light/neon colored bricks look completley white, no matter what I changed the ambient to). Haaaalllppp please. I really need to know this.
(By the way, if this information is needed.. here);
Every 10 seconds I plan to have it change a little more purple/red/dark for dusk starting at 17:00:00. and ending at 19:00:00. It starts to turn from purpleish to blue slowly through-out the night. Starting at 05:00:00, every 10 seconds it turns slightly more Light-Blue-Green until 07:00:00. Through out the day, it slowly changes from a light-blue to a slight autumn orange/red. |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Sep 2011 11:49 PM |
repeat for i = 1, 255 do game.Workspace.Ambient = Color3.new(i/i/i) end until i == nil |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2011 09:50 AM |
| I've tried that with algebraic letters, and it does not work. |
|
|
| Report Abuse |
|
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
|
| 01 Oct 2011 10:29 AM |
Something like this? I don't know if it would work.
game.Lighting.TimeOfDay = "00:00:00" --Time starts at 00:00:00 game.Lighting.Ambient = Color3.new(0,0,0) --Sets the ambient to black. while true do -Loop for i = 1,720 do game.Lighting:SetMinutesAfterMidnight(game.Lighting:GetMinutesAfterMidnight() + 0.03) --Add 1 second every second. game.Lighting.Ambient = game.Lighting.Ambient + Color3.new(1/720,1/720,1/720) end for i = 1,720 do game.Lighting:SetMinutesAfterMidnight(game.Lighting:GetMinutesAfterMidnight() + 0.03) --Add 1 second every second. game.Lighting.Ambient = game.Lighting.Ambient - Color3.new(1/720,1/720,1/720) end end --It makes the ambient darker until 00:00 and then makes it brighter. |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2011 06:13 PM |
| Oh wow. That may work (I need to test it). If it does, thank-you very much! |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 01 Oct 2011 06:59 PM |
I believe just doing
while Wait(1) do game.Lighting:SetMinutesAfterMidnight(game.Lighting:GetMinutesAfterMidnight()+1) end
Alone would do what you want |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2011 07:06 PM |
| No, because I need it to be REALLY dark, so you can't see the enemies that spawn. It just makes it THAT more scary. And that more worth it to build your safe house before night time. |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 01 Oct 2011 07:09 PM |
So mcish game I'm guessing?
while Wait(1) do local time=game.Lighting:GetMinutesAfterMidnight(); game.Lighting:SetMinutesAfterMidnight(time+1); game.Lighting.Ambient=Color3.new((time/86400),(time/86400),(time/86400)); end
try that? |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2011 07:12 PM |
| Yes. It is a craft. I will try that now. (Just wait a few) |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2011 07:20 PM |
| Nah it didn't do what I want. I'll try something my self. I'll post back here if it didn't work. |
|
|
| Report Abuse |
|
|