Modme Forums

Help trigger that deals damage to the player

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


ModmeBot:

Thread By: xdferpc
I wonder. How can I do a trigger that deals damage to the player

when the player is in the trigger


ModmeBot:

Reply By: mathfag
entity browser --> trigger_hurt


ModmeBot:

Reply By: Abnormal202
If you need something more flexible than a trigger hurt (I always find the settings to be pretty lame and restricted) you can always just use a trig_multiple and a script like this:

function trig_damage_player()
{
	trig_multiple = GetEnt("damage_player_trig","targetname");
	players = GetPlayers();
	while(1)
	{
		foreach(player in players)
		{
			if(player IsTouching(trig_multiple))
			{
				player DoDamage( 40 , trig_multiple.origin );
			}
		}
		wait(1);
	}
}

This would do 40 damage to a player in the trig every 1 second.