Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Terrain Color Shifter Script
#1
Not a very big or difficult script; I just made this for Script Builder. Basically, it smoothly shifts the color of the game's Terrain randomly.

[lua]
local redamount = 1
local blueamount = 1
local greenamount = 1

while true do
sleep(0.1)
redamount = redamount + math.random(-1, 1)
if redamount > 8 or redamount < -8 or game.Terrain.Color.r + redamount > 255 or game.Terrain.Color.r + redamount < 0 then
redamount = 0
end
blueamount = blueamount + math.random(-1, 1)
if blueamount > 8 or blueamount < -8 or game.Terrain.Color.b + blueamount > 255 or game.Terrain.Color.b + blueamount < 0 then
blueamount = 0
end
greenamount = greenamount + math.random(-1, 1)
if greenamount > 8 or greenamount < -8 or game.Terrain.Color.g + greenamount > 255 or game.Terrain.Color.g + greenamount < 0 then
greenamount = 0
end
game.Terrain.Color = Color(game.Terrain.Color.r + redamount, game.Terrain.Color.g + greenamount, game.Terrain.Color.b + blueamount)
end
[/lua]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)