Jump to content
Sign in to follow this  
Hank Rearden

Kill Trigger

Recommended Posts

I have a Trigger which is as follows:

SIDE: CIVILIAN

STATE: PRESENT

NAME: CIVNOMORE

FREQUENCY: REPEATEDLY

CONDITION:

this && {((getPosATL _x) select 2) < 5} count thislist > 0  

ON ACT:

{deleteVehicle _x} forEach thislist

What this does for me right now is it deletes all ground based civilian vehicles that enter the trigger radius. What I'm trying to do is delete a civilian convoy spawned dynamically with a convoy managing script. Convoy consists of a bunch of vehicles full of people. What is happening right now is that the vehicles drive into the radius and are deleted but the people are not deleted and die instantly. What do I need to make this trigger delete people in -crew- and -cargo- positions before the vehicles? I mean watching 10 people become airborne out of a Ural is funny but I want to perfect this so I no longer have a pile of civilian bodies lying around. Since the civs are spawned dynamically I don't want to go to the trouble of defining and naming them all if I can just write a trigger that deletes everything that meets its conditions in order of crew->passengers->vehicles.

Thanks in advance.

Share this post


Link to post
Share on other sites

I usually use something like this.

[b]{{deleteVehicle _x} forEach (crew _x);deleteVehicle _x;  } forEach vehicles;[/b]

Share this post


Link to post
Share on other sites

Yes that worked. Though until I put

{{deleteVehicle _x} forEach (crew _x);deleteVehicle _x;  } forEach [b]thislist[/b];

it was deleting every vehicle (static MGs/Helos etc.) on the entire map, even while being operated. Kind of funny too but not in a ha-ha way. ;)

Thanks a bunch though, that worked well.

Share this post


Link to post
Share on other sites

Use vehicles as F2k_Sel said, not everything in the trigger, and make sure vehicles is an array with your convoy vehicles in it:

{{deleteVehicle _x} forEach (crew _x);deleteVehicle _x;  } forEach [convoy1, convoy2, convoy3];

for example, where convoy1 - convoy3 are the names of the vehicles.

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  

×