Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. local t = 0
  2.  
  3. local function make_color(x, y, z)
  4. return string.format("#%02x%02x%02x", math.floor(x * 255), math.floor(y * 255), math.floor(z * 255))
  5. end
  6.  
  7. minetest.register_globalstep(function(dtime)
  8. t = t + dtime
  9. if t > 30 then t = 0 end
  10. for _, player in ipairs(minetest.get_connected_players()) do
  11. player:set_clouds({
  12. density = t * 0.03,
  13. --color = "#fff0f0",
  14. color = make_color(1 - t / 50, 1 - t / 50, 1 - t / 50),
  15. ambient = "#000000",
  16. height = 120.0 - 3 * t,
  17. thickness = 2 + 0.5 * t,
  18. speed = {x = 2, y = t * t / 10}})
  19. --player:set_sky(make_color(0.5, 0.5, 1 - t / 60), "plain")
  20. end
  21. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement