From d8a1adc927a86b0f8c53e2cb7abde3bf437f87fa Mon Sep 17 00:00:00 2001 From: Longus Dongus Date: Wed, 6 Sep 2023 20:26:26 -0700 Subject: [PATCH] Update sisyphus_magic_v2.nut add function to randomize skybox --- vscripts/sisyphus_magic_v2.nut | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/vscripts/sisyphus_magic_v2.nut b/vscripts/sisyphus_magic_v2.nut index 7ab658d4..2f49a59e 100644 --- a/vscripts/sisyphus_magic_v2.nut +++ b/vscripts/sisyphus_magic_v2.nut @@ -182,6 +182,14 @@ function rain_tick(){ VS.EventQueue.AddEvent(rain_tick,2,this); } +::skyboxes<-["sky_csgo_night02","deadcore_sky_9"]; +function random_sky(){ + local skybox = Entities.FindByName(null,"skybox"); + if(skybox==null)return; + skybox.__KeyValueFromString("SkyboxName",skyboxes[RandomInt(0,skyboxes.len()-1)].tostring()); + EntFireByHandle(skybox, "Trigger", "", 0, "", ""); +} + /* TextColor { @@ -635,4 +643,3 @@ function red_mist_squid_rng(){ EntFireByHandle(self,"Kill","",lifetime,null,null); }}); } -