Timer for Power-Ups
-
#include maps\_utility; #include common_scripts\utility; #include maps\_zombiemode_utility; init() { map_name = getdvar("mapname"); if(map_name != "nazi_zombie_prototype") { thread powerup_timer_overlay(); iprintln("Powerup timers enabled on: " + map_name); } else { iprintln("Powerup timers disabled on Nacht der Untoten"); } } powerup_timer_overlay() { level.powerup_timer_hud = []; level endon ("disconnect"); for(i = 0; i < 2; i++) { level.powerup_timer_hud[i] = create_simple_hud(); level.powerup_timer_hud[i].foreground = true; level.powerup_timer_hud[i].sort = 3; level.powerup_timer_hud[i].hidewheninmenu = false; level.powerup_timer_hud[i].alignX = "center"; level.powerup_timer_hud[i].alignY = "bottom"; level.powerup_timer_hud[i].horzAlign = "center"; level.powerup_timer_hud[i].vertAlign = "bottom"; level.powerup_timer_hud[i].x = -32 + (i * 15); level.powerup_timer_hud[i].y = level.powerup_timer_hud[i].y - 20; level.powerup_timer_hud[i].alpha = 1; level.powerup_timer_hud[i].fontscale = 1.2; level.powerup_timer_hud[i].glowcolor = (1, 1, 1); level.powerup_timer_hud[i].glowalpha = 0.8; level.powerup_timer_hud[i].archived = true; level.powerup_timer_hud[i].alpha = 0; } while(true) { if(level.zombie_vars["zombie_powerup_point_doubler_on"] == true) { time_left = int(level.zombie_vars["zombie_powerup_point_doubler_time"] + 0.5); level.powerup_timer_hud[0] SetValue(time_left); level.powerup_timer_hud[0].alpha = 1; } else { level.powerup_timer_hud[0].alpha = 0; } if(level.zombie_vars["zombie_powerup_insta_kill_on"] == true) { time_left = int(level.zombie_vars["zombie_powerup_insta_kill_time"] + 0.5); level.powerup_timer_hud[1] SetValue(time_left); level.powerup_timer_hud[1].alpha = 1; } else { level.powerup_timer_hud[1].alpha = 0; } if(level.zombie_vars["zombie_powerup_point_doubler_on"] == true && level.zombie_vars["zombie_powerup_insta_kill_on"] == true) { level.powerup_timer_hud[0].x = -24; level.powerup_timer_hud[1].x = 24; } else if(level.zombie_vars["zombie_powerup_point_doubler_on"] == true && level.zombie_vars["zombie_powerup_insta_kill_on"] == false) { level.powerup_timer_hud[0].x = 0; } else if(level.zombie_vars["zombie_powerup_insta_kill_on"] == true && level.zombie_vars["zombie_powerup_point_doubler_on"] == false) { level.powerup_timer_hud[1].x = 0; } wait(0.05); } }This code adds a timer to the bonus if you need to know exactly what time it ends.
(only Insta-kill and Double Points are displayed.)
(All maps will display a timer, except Nacht der Untoten, because it already includes)
Tutorial
- Go to the plutonium folder C:\Users\YOU_NAME\AppData\Local\Plutonium\storage\t4\raw\scripts\sp
- Create a text document and name it whatever you want, but replace the extension of this .txt with this .gsc
- We enter my code in the notepad
- And go in and check it's done
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login