A relic of the past. This is a full archive of the Modme Forums. ❤️
Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: ByKrisI using this script function new_zombie_health( starting_health ) { level endon( "intermission" ); // kill this function when the players die and the game enters intermission while(1) // always do this { zoms = GetAISpeciesArray( "axis" ); // Get all of the enemies foreach( zom in zoms ) // Do this for all of the enemies { if( isDefined(zom.animname) && zom.animname == "zombie" && !isDefined(zom.health_reset) ) // Lets be sure they are a zombie before we do this { zom.health = health_think( starting_health ); // Reassign their health to the value returned by the function health_think zom.health_reset = true; // this is so we dont keep reassigning the same health to a zombie } } wait(0.25); // we will wait 0.25 seconds because the zombies spawn in rather slow. No need to run this very fast } } function health_think( starting_health ) // This function does the default math to assign health per round customize it anyway you want { round = level.round_number; // Get the round number if( round ) // if it is round 1 do this health = starting_health; else if( round < 10 ) // if the round is less than 10 do this health = starting_health + round*300 - 10; else // if the round is not 1 or less than 10 do this health = (starting_health + 1000) * 1.1^round; return health; // return the health value } thread new_zombie_health( 300 ); // 150 is the default starting health But the zombies have the same life in all rounds, what i doing bad?
function new_zombie_health( starting_health ) { level endon( "intermission" ); // kill this function when the players die and the game enters intermission while(1) // always do this { zoms = GetAISpeciesArray( "axis" ); // Get all of the enemies foreach( zom in zoms ) // Do this for all of the enemies { if( isDefined(zom.animname) && zom.animname == "zombie" && !isDefined(zom.health_reset) ) // Lets be sure they are a zombie before we do this { zom.health = health_think( starting_health ); // Reassign their health to the value returned by the function health_think zom.health_reset = true; // this is so we dont keep reassigning the same health to a zombie } } wait(0.25); // we will wait 0.25 seconds because the zombies spawn in rather slow. No need to run this very fast } } function health_think( starting_health ) // This function does the default math to assign health per round customize it anyway you want { round = level.round_number; // Get the round number if( round ) // if it is round 1 do this health = starting_health; else if( round < 10 ) // if the round is less than 10 do this health = starting_health + round*300 - 10; else // if the round is not 1 or less than 10 do this health = (starting_health + 1000) * 1.1^round; return health; // return the health value }
thread new_zombie_health( 300 ); // 150 is the default starting health