Would work Rhysduk sure (if he named the trigger: killtrig)...
...but it would be very CPU stressing, running a script for each single unit to do that.
Here's another way to do it with a trigger and one single script:
Put a trigger over the area you need;
Activation: west / present / once
name: killtrig
condition: this
onActivation: [] exec "kill.sqs"
Now you must take care:
In the first unit's init field, which you place on the map put following code:
killlist = []
And into each unit's inti field, which should die when entering the area put following code:
killlist = killist + [this]
:note - the init fields of the units will be executed according to first placed first runs
this means the init field of the first unit being placed onto the map will become executed first.
Therefore you need to initialize the array 'killlist' from that unit's inti field.
Now if the first unit being placed should be included to the list also you can change the code
i said above into: killlist = [this]
If not, just make it: killlist = []
Now the script - make kill.sqs file in your missionfolder and put following code inside:
#loop
"if _x in list killtrig then {_x setdammage 1}" foreach killlist
~0.5
goto "loop"
:note - this script will every 0.5 seconds kill anybody who is included in the killlist AND inside the
trigger's area.
If you think you don't need this every 0.5 seconds, just change the
~0.5 into
~whatever_you_need.
I would recommend increasing the delay so that you again can save cpu power since it's usually not necessary
to check every half of a second for something like this (5 seconds should do it aswell).
::note - there's way more methods to do so, but this was the first one i've been thinking about and while posting
there came at least 3 or 4 more into my mind but we will see
~S~ CD