Jump to content
Sign in to follow this  
Nicole_UK

Delete everything in trigger area - NEED HELP

Recommended Posts

Hello! Im needing some help with deleting stuff inside a trigger area.

 

Im wanting to make my own base, its very detailed and will be very laggy to keep for the whole mission. Im only at the base for the start of the mission then I travel away. I am wanting to be able to delete everything when I am away from it.

 

Im thinking I need to make a trigger big enough to cover my base then when I move away and pass another trigger which deletes everything in the first trigger?

 

Iv seen someone on a similar post say you can do it by using   

{deleteVehicle _x} forEach nearestObjects [player, ["all"], 200]

   but Im not sure where to put this. Also Im not wanting the nearest objects to me to be deleted Im wanting everything inside a trigger area to be deleted (objects, vehicles, ai units, the whole base) when I am far enough away from it.

 

Can someone help me please? It seems like it should be really simple but Im struggling lol

Share this post


Link to post
Share on other sites

One way to do this would be:

 

Condition:
 

(allPlayers findIf {_x distance thisTrigger < 50 || _x inArea thisTrigger}) == -1 //Check if all players are far enough away and no player is in the trigger area

 

Activation:

 

(nearestObjects [thisTrigger, [], triggerArea thisTrigger # 0 max triggerArea thisTrigger # 1]) apply {deleteVehicle _x}; //Get all objects in the area of the trigger. Trigger area is not precise here. Could be done by an addional check though.

 

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  

×