Modme Forums
Menu:

multiple models help

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


ModmeBot:

Thread By: KillJoyYT
how do I make it so there are multiple models being deleted from the trigger?


function perk_ee_trig()
{
	self waittill("trigger", player);
	model = GetEnt(self.target, "targetname");
	model Delete();
	self Delete();
	level.ingr++;
}


its getentarray right?

I tried that but still each trig only deletes one model instead of two

thank you


ModmeBot:

Reply By: mathfag

function perk_ee_trig() //self = trigger
{
	self waittill("trigger", player);
	model = GetEntArray(self.target, "targetname"); //a bunch of entities with the same targetname, which are also the target of self
	
	foreach(potato in model) //for every model in the array do this
		{
		potato Delete();
		}

	self Delete();
	level.ingr++;
}

You can change potato to whatever you want


ModmeBot:

Reply By: KillJoyYT
thanks mate!