Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local t = 0
- local function make_color(x, y, z)
- return string.format("#%02x%02x%02x", math.floor(x * 255), math.floor(y * 255), math.floor(z * 255))
- end
- minetest.register_globalstep(function(dtime)
- t = t + dtime
- if t > 30 then t = 0 end
- for _, player in ipairs(minetest.get_connected_players()) do
- player:set_clouds({
- density = t * 0.03,
- --color = "#fff0f0",
- color = make_color(1 - t / 50, 1 - t / 50, 1 - t / 50),
- ambient = "#000000",
- height = 120.0 - 3 * t,
- thickness = 2 + 0.5 * t,
- speed = {x = 2, y = t * t / 10}})
- --player:set_sky(make_color(0.5, 0.5, 1 - t / 60), "plain")
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement