|
| 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 |
|
|
|
| 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 |
|
|
|
| 28 Feb 2013 06:52 PM |
Very nice! Thanks a ton!
Much appreciated! |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 28 Feb 2013 07:04 PM |
| I replied to your PM with an actually /working/ color tweening since I am dumb... >.> |
|
|
| Report Abuse |
|
|