Jump to content
Sign in to follow this  
Doodle

Kill all trigger

Recommended Posts

Wonder if anyone can help out with this

For mission testing purposes I need a couple of triggers (one for opfor one for independent) that I can activate with a Radio trigger that will kill/delete ALL - OPFOR

I sure it will be something like if side = opfor setDamage 1.0; but I am not sure of the exact code

Thanks in advance

Share this post


Link to post
Share on other sites

Radio alpha on act

{
 if (side _x == opfor) then {
   _ setDamage 1;
 };
}forEach allUnits;

You should be able to figure out independent using that

---------- Post added at 12:30 PM ---------- Previous post was at 12:29 PM ----------

Should be _x setDamage 1, can't edit from phone.

Share this post


Link to post
Share on other sites

Perfect - Many thanks

Dont suppose you could help with what would I have to add to this so it deleted all vehicles and crew too. Or even better an seperate trigger that deletes all opfor land/air vehicles and their crews but not static weapons?

Thanks again

Share this post


Link to post
Share on other sites
{
 if (side _x == opfor) then {
if (vehicle _x == _x) then {
	_x setDamage 1;
}else{
	if !((vehicle _x) isKindOf "StaticWeapon") then {
		{deleteVehicle _x} forEach (crew (vehicle _x) +  [vehicle _x]);
	};
};
 };
}forEach allUnits;

Share this post


Link to post
Share on other sites
{
 if (side _x == opfor) then {
if (vehicle _x == _x) then {
	_x setDamage 1;
}else{
	if !((vehicle _x) isKindOf "StaticWeapon") then {
		{deleteVehicle _x} forEach (crew (vehicle _x) +  [vehicle _x]);
	};
};
 };
}forEach allUnits;

Thanks a lot, much appreciated.

Share this post


Link to post
Share on other sites

The code below deletes all AI but I need it to only delete BluFor Ai - can anyone help please?

{if(!isPlayer _x) then {deleteVehicle _x;};} forEach allUnits;

thanks in advance

Share this post


Link to post
Share on other sites

once again I am in your debt!

Thanks

though I feel another question coming up................

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  

×