Jump to content
Sign in to follow this  
Katrician

A trigger to kill ALL units and groups

Recommended Posts

Hello I try to debug a mission, but having multiples objectives and triggers I need to test the end of my mission without playing it from the start, so I need a trigger that kill ALL units and groups within its range, that I call by radio Alpha etc....

The AI units and groups in question are all placed on the map, I don't need to detect if they enter or left the trigger, the idea is to put a trigger with enough size to kill units I need to kill so the tasks (objectives) are done.Thank you.

Share this post


Link to post
Share on other sites

Here's a two trigger method.

Trig1 set to radio alpha and in the on act box put trig=true, set the axis to 0 ,0

Trig2 place over your units and in the condition change this to trig and in the on act put {_x setdamage 1} foreach thislist

And now the one trigger method

name the trigger trig and set to radio alpha

in the on act put,

{ _x setdamage 1} foreach nearestobjects [trig,["man"],55];

55 is the radius of the area. We are not using the trigger size here so it could be 0,0

Share this post


Link to post
Share on other sites
Hello I try to debug a mission, but having multiples objectives and triggers I need to test the end of my mission without playing it from the start, so I need a trigger that kill ALL units and groups within its range, that I call by radio Alpha etc....

The AI units and groups in question are all placed on the map, I don't need to detect if they enter or left the trigger, the idea is to put a trigger with enough size to kill units I need to kill so the tasks (objectives) are done.Thank you.

Salut,

ok so put a trigger covering all units you wanna kill, for example OPFOR, present, repeatable, and write this in the on activation line :

list_to_kill=thislist

then write what's following in the on activation line of the radio trigger :

{_x setdammage 1} foreach list_to_kill

EDIT : too late

Share this post


Link to post
Share on other sites

Actually there is a problem, if the units are in a vehicle it will destroy the vehicle but the units will get out and are still alive you will have to call the radio twice.

This should kill everything.

name the trigger trig and set to radio alpha

in the on act put,

{ _x setdamage 1} foreach nearestobjects [trig,["allvehicles"],55];call { [] spawn { sleep 5; { _x setdamage 1} foreach nearestobjects [trig,["man"],55];}};

It will take around 5 secs (sleep 5) as it needs time for units to exit vehicles before you can kill them.

I'm sure there's a better way I just can't see it today.

Edited by F2k Sel

Share this post


Link to post
Share on other sites
Salut,

ok so put a trigger covering all units you wanna kill, for example OPFOR, present, repeatable, and write this in the on activation line :

list_to_kill=thislist

then write what's following in the on activation line of the radio trigger :

{_x setdammage 1} foreach list_to_kill

EDIT : too late

Erm not clear?

Actually there is a problem, if the units are in a vehicle it will destroy the vehicle but the units will get out and are still alive you will have to call the radio twice.

This should kill everything.

name the trigger trig and set to radio alpha

in the on act put,

{ _x setdamage 1} foreach nearestobjects [trig,["allvehicles"],55];call { [] spawn { sleep 5; { _x setdamage 1} foreach nearestobjects [trig,["man"],55];}};

It will take around 5 secs (sleep 5) as it needs time for units to exit vehicles before you can kill them.

I'm sure there's a better way I just can't see it today.

Outstanding! F2k Sel not only your only one trigger worked, but I steeped on the vehicle "problem"; and while I want to post results you were already pointing it lol; I will try your second essay tomorow and tell you how it has worked in the end Cheers.

Share this post


Link to post
Share on other sites
Salut,

ok so put a trigger covering all units you wanna kill, for example OPFOR, present, repeatable, and write this in the on activation line :

list_to_kill=thislist

then write what's following in the on activation line of the radio trigger :

{_x setdammage 1} foreach list_to_kill

EDIT : too late

You can also place this in the Initialization field of any unit:

This will kill everything:

{_x setDamage 1;} forEach allUnits;

Don't wanna kill the player?

{if(_x != player) then {_x setDamage 1;};} forEach allUnits;

Only within certain range (and not player)?

{if(_x != player && getPos _x distance getMarkerPos "someMarker" < 2000) then {_x setDamage 1;};} forEach allUnits;

(Create a marker called someMarker, replace 2000 with the range in meters).

Edited by MulleDK19

Share this post


Link to post
Share on other sites

Thanks, allunits that's another command I've never used before.

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  

×