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
 

:D

Previous Thread :: Next Thread 
TotallyNotAsimo is not online. TotallyNotAsimo
Joined: 24 Feb 2013
Total Posts: 6
28 Feb 2013 06:32 PM
Hey!
I know of a few different ways to change the fog color gradually but I was wondering what the most efficient way would be of doing it? And perhaps the best looking way too?
I'm currently using a few values and an on-change script.
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
28 Feb 2013 06:39 PM
color1 = Color3.new(256,256,256) --Starter
color2 = Color3.new(90,90,90) --End
for i=1,10 do --How many steps you need in between
local col=color1; --I'm lazy.
col=col+Color3.new(color2.R/10,0,0)
col=col+Color3.new(0,color2.G/10,0)
col=col+Color3.new(0,0,color2.B/10)
game.Lighting.FogColor=col
end
Report Abuse
TotallyNotAsimo is not online. TotallyNotAsimo
Joined: 24 Feb 2013
Total Posts: 6
28 Feb 2013 06:52 PM
Very nice! Thanks a ton!

Much appreciated!
Report Abuse
ArbiterOfDeath is not online. ArbiterOfDeath
Joined: 20 Jun 2011
Total Posts: 1458
28 Feb 2013 06:59 PM
Try to save all the colors in a value in a table that you are going to use, then just iterate over them. Few notes about this approach:

1.) Memory cost is relatively higher
2.) You can spend more time creating the colors
3.) Implementing is harder then other methods (not that bad)
4.) The action moment will run smoother
5.) Should only be implemented if you need high detail
6.) Best when you go through multiple colors

Otherwise I would recommend doing it the old fashion way; it shouldn't create too much lag. If it does lag up then use the method above.
Report Abuse
TotallyNotAsimo is not online. TotallyNotAsimo
Joined: 24 Feb 2013
Total Posts: 6
28 Feb 2013 07:04 PM
I'm getting an error that "R" doesn't exist @RenderSettings

Didnt change anything but the Color1 and 2 values.
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
28 Feb 2013 07:04 PM
I replied to your PM with an actually /working/ color tweening since I am dumb... >.>
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