Modme Forums
Menu:

Set the zombies health

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: belly3031
Just want a trigger to set all the zombies health to a certain amount please


ModmeBot:

Reply By: mathfag

function trigger_health()
{
trig = GetEnt("health_trig","targetname");

trig waittill("trigger", player);

zombies = GetAiSpeciesArray( "axis", "all" );
foreach(zom in zombies)
	{
	zom.health = 42069;	
	}
}


ModmeBot:

Reply By: Harry Bo21

mathfag
function trigger_health() { trig = GetEnt("health_trig","targetname"); trig waittill("trigger", player); zombies = GetAiSpeciesArray( "axis", "all" ); foreach(zom in zombies) { zom.health = 42069; } }

need to set "maxhealth" first or itll cap it...