Bumping up Special Infected
/* hunterhealth.nut author: Lee Pumphret https://www.leeland.info */ Msg("HUNTERS v3"); BossHunterCount <- 6; // how many you want FoundBossHunters <- 0 UseBossHunters <- 0; HunterHealth <- 1250 OurHunters <- [] // keep track of our bumped up hunters OurLastSeen <- null // track the last we've seen so we don't have to traverse the entire entity list function Think(){ if (UseBossHunters){ local z while (z = Entities.FindByModel(OurLastSeen,"models/infected/hunter.mdl")){ if (FoundBossHunters++ < BossHunterCount){ z.SetHealth(HunterHealth); OurHunters.push(z); // save a reference to our guys printl("Hunter #"+FoundBossHunters+" "+z.GetClassname() + " health:"+z.GetHealth()); }else { //printl("Hunter cap hit, disabling"); UseBossHunters = 0 // turns ourselves off DirectorScript.DirectorOptions.HunterLimit = 0 } OurLastSeen = z } } if (OurHunters){ DeadHunters <- 0; foreach (hunter in OurHunters){ //printl("looking at hunter " + hunter + " health is "+hunter.GetHealth()); if (!hunter.IsValid() || (hunter.GetHealth() <= 1)){ /* dead hunter has 1 health, why? */ DeadHunters++; } } if (DeadHunters == BossHunterCount){ Msg("Boss Hunters dead..."); OurHunters = []; StopBossHunters(); // EntFire your sound here... EntFire("director","beginscript", "hunters_b.nut") // or scriptname.nuc if it's a nuc } } } function StartBossHunters(){ Msg("Activating Boss Hunters") UseBossHunters = 1 FoundBossHunters = 0 local Dopts = DirectorScript.DirectorOptions // get a reference to the options Dopts.BoomerLimit <- 0 Dopts.SmokerLimit <- 0 Dopts.HunterLimit <- BossHunterCount Dopts.ChargerLimit <- 0 Dopts.SpitterLimit <- 0 Dopts.JockeyLimit <- 0 Dopts.DominatorLimit <- BossHunterCount Dopts.MaxSpecials <- BossHunterCount EntFire("spawn_hunter","spawnzombie", "hunter") // or scriptname.nuc if it's a nuc } function StopBossHunters(){ Msg("Deactivating Boss Hunters") UseBossHunters = 0 local Dopts = DirectorScript.DirectorOptions // get a reference to the options Dopts.BoomerLimit <- 1 Dopts.SmokerLimit <- 1 Dopts.HunterLimit <- 1 Dopts.ChargerLimit <- 1 Dopts.SpitterLimit <- 1 Dopts.JockeyLimit <- 1 Dopts.DominatorLimit <- 3 Dopts.MaxSpecials <- 4 } }