Jump to content
Sign in to follow this  
Ghost113

Death Trigger

Recommended Posts

I couldn't find this in a search so I thought I would post and see if anyone has some solutions.

I have units spawning and running to a certain area. But what I want to have happen is when they enter the trigger is for them to die.

I know you can use the function setHit/setDamage but that's only if the units are named. Is there a way to name the units in the BIS_fnc_spawnGroup?

In the on Act field of the trigger I've tried: this setDamage 1. But nothing happens.

Any help would be appreciated. Thanks.

Share this post


Link to post
Share on other sites

This function, if I'm not mistaken, returns name of a spawned group, so if you use it eg this way:

DT_group1 = [getPos aPos, EAST, 5] call BIS_fnc_spawnGroup

Then global variable DT_group1 should contain spawned group name. You do not need nothing more, now you can try in the trigger's act field:

{_x setDamage 1} foreach (units DT_group1);

Same variable may be used in condition field, eg instead of default "true", something like:

(((leader DT_group1) distance NameOfThisTrigger) < 50)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×