diff --git a/VScripts/scripting/vscript_ze_dreamin_v2.sp b/VScripts/scripting/vscript_ze_dreamin_v2.sp index 79bda157..b41db433 100644 --- a/VScripts/scripting/vscript_ze_dreamin_v2.sp +++ b/VScripts/scripting/vscript_ze_dreamin_v2.sp @@ -414,7 +414,7 @@ public void spike_maker_top(const char[] output, int caller, int activator, floa //---------------------------------------------------------------------------------------------------- public void trigger_once_389450_display(const char[] output, int caller, int activator, float delay) { - Display(30, 0); + Display(30); } //---------------------------------------------------------------------------------------------------- @@ -422,7 +422,7 @@ public void trigger_once_389450_display(const char[] output, int caller, int act //---------------------------------------------------------------------------------------------------- public void trigger_once_385777_display(const char[] output, int caller, int activator, float delay) { - Display(20, 0); + Display(20); } //---------------------------------------------------------------------------------------------------- @@ -430,7 +430,7 @@ public void trigger_once_385777_display(const char[] output, int caller, int act //---------------------------------------------------------------------------------------------------- public void trigger_once_385886_display(const char[] output, int caller, int activator, float delay) { - Display(20, 0); + Display(20); } //---------------------------------------------------------------------------------------------------- @@ -438,7 +438,7 @@ public void trigger_once_385886_display(const char[] output, int caller, int act //---------------------------------------------------------------------------------------------------- public void trigger_once_386004_display(const char[] output, int caller, int activator, float delay) { - Display(20, 0); + Display(20); } //---------------------------------------------------------------------------------------------------- @@ -446,7 +446,7 @@ public void trigger_once_386004_display(const char[] output, int caller, int act //---------------------------------------------------------------------------------------------------- public void func_button_381396_display(const char[] output, int caller, int activator, float delay) { - Display(30, 0); + Display(30); } //---------------------------------------------------------------------------------------------------- @@ -454,7 +454,7 @@ public void func_button_381396_display(const char[] output, int caller, int acti //---------------------------------------------------------------------------------------------------- public void trigger_once_381463_display(const char[] output, int caller, int activator, float delay) { - Display(30, 0); + Display(30); } //---------------------------------------------------------------------------------------------------- @@ -462,7 +462,7 @@ public void trigger_once_381463_display(const char[] output, int caller, int act //---------------------------------------------------------------------------------------------------- public void trigger_once_381581_display(const char[] output, int caller, int activator, float delay) { - Display(50, 0); + Display(50); } //---------------------------------------------------------------------------------------------------- @@ -470,7 +470,7 @@ public void trigger_once_381581_display(const char[] output, int caller, int act //---------------------------------------------------------------------------------------------------- public void trigger_once_381648_display(const char[] output, int caller, int activator, float delay) { - Display(30, 0); + Display(30); } //---------------------------------------------------------------------------------------------------- @@ -478,7 +478,7 @@ public void trigger_once_381648_display(const char[] output, int caller, int act //---------------------------------------------------------------------------------------------------- public void trigger_once_378212_display(const char[] output, int caller, int activator, float delay) { - Display(30, 0); + Display(30); } //---------------------------------------------------------------------------------------------------- @@ -486,7 +486,7 @@ public void trigger_once_378212_display(const char[] output, int caller, int act //---------------------------------------------------------------------------------------------------- public void trigger_once_375007_display(const char[] output, int caller, int activator, float delay) { - Display(20, 0); + Display(20); } //---------------------------------------------------------------------------------------------------- @@ -494,7 +494,7 @@ public void trigger_once_375007_display(const char[] output, int caller, int act //---------------------------------------------------------------------------------------------------- public void func_button_241061_display(const char[] output, int caller, int activator, float delay) { - Display(30, 0); + Display(30); } //---------------------------------------------------------------------------------------------------- @@ -502,7 +502,7 @@ public void func_button_241061_display(const char[] output, int caller, int acti //---------------------------------------------------------------------------------------------------- public void trigger_once_213033_display(const char[] output, int caller, int activator, float delay) { - Display(30, 0); + Display(30); } //---------------------------------------------------------------------------------------------------- @@ -510,7 +510,7 @@ public void trigger_once_213033_display(const char[] output, int caller, int act //---------------------------------------------------------------------------------------------------- public void trigger_once_142829_display(const char[] output, int caller, int activator, float delay) { - Display(20, 0); + Display(20); } //---------------------------------------------------------------------------------------------------- @@ -518,7 +518,7 @@ public void trigger_once_142829_display(const char[] output, int caller, int act //---------------------------------------------------------------------------------------------------- public void trigger_once_95608_display(const char[] output, int caller, int activator, float delay) { - Display(30, 0); + Display(30); } //---------------------------------------------------------------------------------------------------- @@ -526,7 +526,7 @@ public void trigger_once_95608_display(const char[] output, int caller, int acti //---------------------------------------------------------------------------------------------------- public void trigger_once_95733_display(const char[] output, int caller, int activator, float delay) { - Display(30, 0); + Display(30); } //---------------------------------------------------------------------------------------------------- @@ -534,7 +534,7 @@ public void trigger_once_95733_display(const char[] output, int caller, int acti //---------------------------------------------------------------------------------------------------- public void trigger_once_95823_display(const char[] output, int caller, int activator, float delay) { - Display(30, 0); + Display(30); } //---------------------------------------------------------------------------------------------------- @@ -542,7 +542,7 @@ public void trigger_once_95823_display(const char[] output, int caller, int acti //---------------------------------------------------------------------------------------------------- public void func_button_77927_display(const char[] output, int caller, int activator, float delay) { - Display(30, 0); + Display(30); } //---------------------------------------------------------------------------------------------------- @@ -550,7 +550,7 @@ public void func_button_77927_display(const char[] output, int caller, int activ //---------------------------------------------------------------------------------------------------- public void trigger_once_23408_display(const char[] output, int caller, int activator, float delay) { - Display(35, 0); + Display(35); } //---------------------------------------------------------------------------------------------------- @@ -558,7 +558,7 @@ public void trigger_once_23408_display(const char[] output, int caller, int acti //---------------------------------------------------------------------------------------------------- public void trigger_once_23452_display(const char[] output, int caller, int activator, float delay) { - Display(20, 0); + Display(20); } //---------------------------------------------------------------------------------------------------- @@ -566,7 +566,7 @@ public void trigger_once_23452_display(const char[] output, int caller, int acti //---------------------------------------------------------------------------------------------------- public void trigger_once_23474_display(const char[] output, int caller, int activator, float delay) { - Display(25, 0); + Display(25); } //---------------------------------------------------------------------------------------------------- @@ -574,7 +574,7 @@ public void trigger_once_23474_display(const char[] output, int caller, int acti //---------------------------------------------------------------------------------------------------- public void func_breakable_23551_display(const char[] output, int caller, int activator, float delay) { - Display(20, 0); + Display(20); } //---------------------------------------------------------------------------------------------------- @@ -582,7 +582,7 @@ public void func_breakable_23551_display(const char[] output, int caller, int ac //---------------------------------------------------------------------------------------------------- public void func_button_21950_display(const char[] output, int caller, int activator, float delay) { - Display(30, 0); + Display(30); } //---------------------------------------------------------------------------------------------------- @@ -590,7 +590,7 @@ public void func_button_21950_display(const char[] output, int caller, int activ //---------------------------------------------------------------------------------------------------- public void func_button_22017_display(const char[] output, int caller, int activator, float delay) { - Display(10, 0); + Display(10); } //---------------------------------------------------------------------------------------------------- @@ -598,7 +598,7 @@ public void func_button_22017_display(const char[] output, int caller, int activ //---------------------------------------------------------------------------------------------------- public void func_breakable_3664_display(const char[] output, int caller, int activator, float delay) { - Display(45, 0); + Display(45); } //---------------------------------------------------------------------------------------------------- @@ -606,13 +606,13 @@ public void func_breakable_3664_display(const char[] output, int caller, int act //---------------------------------------------------------------------------------------------------- public void math_counter_11288_display(const char[] output, int caller, int activator, float delay) { - Display(51, 0); + Display(51); } //---------------------------------------------------------------------------------------------------- // Purpose: //---------------------------------------------------------------------------------------------------- -public void Display(int amount, int i) +public void Display(int amount) { float fOrigin[3]; fOrigin[0] = 0.0; @@ -623,22 +623,21 @@ public void Display(int amount, int i) DispatchKeyFormat(iRelay, "targetname", "vscript_countdown_relay"); DispatchKeyFormat(iRelay, "spawnflags", "0"); DispatchKeyFormat(iRelay, "OnTrigger", "seconds_left,AddOutput,message seconds left,0,-1"); + DispatchKeyFormat(iRelay, "OnTrigger", "text_sec,AddOutput,message %d,0,-1", amount - 1); - int x = amount; - int y = i; - for (int j = 1; j <= amount; j++) + int iBackup = amount; + + for (int j = 0; j <= amount; j++) { - if (x > y) - { - DispatchKeyFormat(iRelay, "OnTrigger", "text_sec,AddOutput,message %d,%d,-1", x - 1, j - 1); - DispatchKeyFormat(iRelay, "OnTrigger", "text_sec,Display,,%d,-1",j - 1); - DispatchKeyFormat(iRelay, "OnTrigger", "seconds_left,Display,,%d,-1",j - 1); - x = x - 1; - } - else - DispatchKeyFormat(iRelay, "OnTrigger", "!self,Kill,,%d,-1",j - 1); - + iBackup --; + DispatchKeyFormat(iRelay, "OnTrigger", "text_sec,AddOutput,message %d,%d,-1", iBackup, j); + DispatchKeyFormat(iRelay, "OnTrigger", "text_sec,Display,,%d,-1",j); + DispatchKeyFormat(iRelay, "OnTrigger", "seconds_left,Display,,%d,-1",j); } + DispatchKeyFormat(iRelay, "OnTrigger", "text_sec,AddOutput,message ,%d,-1",amount + 1); + DispatchKeyFormat(iRelay, "OnTrigger", "seconds_left,AddOutput,message ,%d,-1",amount + 1); + DispatchKeyFormat(iRelay, "OnTrigger", "!self,Kill,,%d,-1",amount + 2); + SpawnAndActivate(iRelay); AcceptEntityInput(iRelay, "Trigger"); }