generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Okay.. I have a major problem with Ambient...

Previous Thread :: Next Thread 
Cutemooshi is not online. Cutemooshi
Joined: 22 Oct 2009
Total Posts: 12637
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
Cutemooshi is not online. Cutemooshi
Joined: 22 Oct 2009
Total Posts: 12637
30 Sep 2011 11:31 PM
Bump?
Report Abuse
QuantamDimensions is not online. QuantamDimensions
Joined: 20 Sep 2011
Total Posts: 47
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
Cutemooshi is not online. Cutemooshi
Joined: 22 Oct 2009
Total Posts: 12637
01 Oct 2011 09:50 AM
I've tried that with algebraic letters, and it does not work.
Report Abuse
eJorge is not online. 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
Cutemooshi is not online. Cutemooshi
Joined: 22 Oct 2009
Total Posts: 12637
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 is not online. 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
Cutemooshi is not online. Cutemooshi
Joined: 22 Oct 2009
Total Posts: 12637
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 is not online. 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
Cutemooshi is not online. Cutemooshi
Joined: 22 Oct 2009
Total Posts: 12637
01 Oct 2011 07:12 PM
Yes. It is a craft. I will try that now. (Just wait a few)
Report Abuse
Cutemooshi is not online. Cutemooshi
Joined: 22 Oct 2009
Total Posts: 12637
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image