Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
ziga.cernic4@hotmail.com

Exclude some units from trigger?

Recommended Posts

Can someone tell me how I could exclude some units from deleting when trigger is activated?

 

This is the code: {deleteVehicle _x} forEach nearestObjects [name, ["all"], 300] - units group player

 

I`d for example like to not remove 5 soldiers whose names are a,b,c,d,e. How could I do that?

Share this post


Link to post
Share on other sites
{
	deleteVehicle _x;
} forEach nearestObjects [(position player), [], 300] - (units group player) - [a, b, c, d, e];

 

Share this post


Link to post
Share on other sites

EDIT: Shit, sorry misunderstood. Thought you meant in the trigger. Post can get deleted.

Or:

 

// Not tested yet.
_noDelete = [a,b,c,d];
{if (!((name _x) in _noDelete || _x == player) then { deleteVehicle _x};} foreach list _triggerName; 

 

Share this post


Link to post
Share on other sites
Sign in to follow this  

×