[ZM] BO3's Three hit system and increased health for when the player(s) obtain Juggernog for BO2 Zombies
-
To add this script first copy n' paste this code into Notepad++ then save it as a ".txt" after edit the change ".txt" to ".gsc" -- if you don't know how to do that open up a random folder look for "View" at the top and click it. A drop down menu should appear and you'll see "Show" at the bottom, click it and you'll see "File name extension" and should be able to change ".txt" to ".gsc"
--You can name the file whatever you want, just make sure it ends with ".gsc"
After the File name extension change add the ".gsc" to the Plutonium folders by:
Win + R and Run "%localappdata%" then search for "Plutonium" and go the folders as shown: Local/Plutonium/storage/t6/scripts/zm#include common_scripts\utility; #include maps\mp\_utility; init() { level thread onPlayerConnect(); } onPlayerConnect() { for (;;) { level waittill("connected", player); player thread onPlayerSpawned(); } } onPlayerSpawned() { self endon("disconnect"); level endon("game_ended"); for (;;) { self waittill("spawned_player"); // Initialize state self.jugActive = false; // Apply base health immediately on spawn self.maxhealth = 150; self.health = self.maxhealth; self IPrintLnBold("Base Health set to 150HP"); // Start two threads: // 1) continuously watch for hasPerk changes (jug acquired/lost) // 2) reapply appropriate health immediately on revive (fixes game resetting to 100) self thread monitorPerkChanges(); self thread handleRevives(); } } monitorPerkChanges() { self endon("disconnect"); level endon("game_ended"); // Polling loop - keeps the perk state correct even across edge cases for (;;) { wait 0.5; // Correct function to detect Juggernog perk hasJugNow = (self hasPerk("specialty_armorvest")); // If perk state changed, update health accordingly if (!isDefined(self.jugActive) || hasJugNow != self.jugActive) { self.jugActive = hasJugNow; if (self.jugActive) { // Player has Jug -> set to 300 self.maxhealth = 300; self.health = self.maxhealth; self IPrintLnBold("Juggernog acquired! Health set to 300HP"); } else { // Player doesn't have Jug -> ensure base 150 self.maxhealth = 150; self.health = self.maxhealth; self IPrintLnBold("Juggernog lost or not owned. Health set to 150HP"); } } } } handleRevives() { self endon("disconnect"); level endon("game_ended"); for (;;) { // This waits until the player is revived. // When revive happens, the game's internal logic can reset health to 100, // so we immediately reapply our desired maxhealth based on current jugActive. self waittill("player_revived"); // After revive, reapply correct health state if (isDefined(self.jugActive) && self.jugActive) { // If jugActive is true (player still has perk after revive), we follow your requirement: // you requested that getting down after having jug should revert to 150 until jug is reobtained. // So we will revert to 150 on revive even if they had jug before going down. // // If you instead want revive to keep Jug's 300 when they still own Jug after revive, // change the following block to set 300 instead of 150. self.maxhealth = 150; self.health = self.maxhealth; self IPrintLnBold("Revived — health set to 150HP (must re-obtain Jug to get 300HP)"); } else { // No Jug — ensure base 150 self.maxhealth = 150; self.health = self.maxhealth; self IPrintLnBold("Revived — health remains 150HP"); } // Note: monitorPerkChanges() will immediately detect if the player re-buys Jug after revive // and will set the health to 300 when that happens. } } -
Coronavirus-19 The game crashes whenever i get knocked down, i modified the script to change the base health and the jug health values, what can cause the crash?
-
Coronavirus-19 The game crashes whenever i get knocked down, i modified the script to change the base health and the jug health values, what can cause the crash?
Knitby I'm still using it currently and have had no issues. Are you sure you copied it correctly? If it's still giving issues I'll upload a mediafire download!