WorldLoaded = function() Media.PlaySound("rain.aud") end Tick = function() -- Perf: access to local variables is faster... in theory local Utils = Utils if (Utils.RandomInteger(1, 1000) == 10) then local delay = Utils.RandomInteger(1, 10) Lighting.Flash("LightningStrike", delay) Trigger.AfterDelay(delay, function() Media.PlaySound("thunder" .. Utils.RandomInteger(1,6) .. ".aud") end) end if (Utils.RandomInteger(1, 1000) == 10) then Media.PlaySound("thunder-ambient.aud") end if (DateTime.GameTime % DateTime.Seconds(12) == 0) then Media.PlaySound("rain.aud") end end