Home   Help Search Login Register  

Author Topic: Delete everything in a trigger area?  (Read 1412 times)

0 Members and 1 Guest are viewing this topic.

Offline stephen271276

  • Members
  • *
Delete everything in a trigger area?
« on: 19 Feb 2011, 12:27:24 »
Im wondering is there a way to place a trigger that will "deleteVehicle "everything in its radius?
I want to just get rid of stuff ive put in mission as ambience once its been seen?
Ie. During a chopper flight to an objective Ive placed two groups of blufor infantry taking out some enemy armour, but once Ive moved on theres no point in the units just sitting there i may aswell delete them, now I know i can individually name them and dekete them that way but was just wondering if theres an easier quicker way?

Offline F2kSel

  • Members
  • *
Re: Delete everything in a trigger area?
« Reply #1 on: 19 Feb 2011, 15:33:22 »
This will delete unit's and  vehicles but not objects placed as triggers don't usually check for objects unless grouped to them.
TRIG
Set the size of the trigger to cover the area you require
Anyone
Present
ON ACT
{{deleteVehicle _x} forEach crew _x + [_x];} foreach thislist]




This is a bit more complex but quite usefull.
TRIG
size 0
name Trig1
Cond
player  distance Trig1 > 100
ON Act
what = nearestobjects [Trig1,[], 33];     {   {deleteVehicle _x} forEach crew _x + [_x];      } forEach what;


[Trig1,[], 33];   Trig1 = location in this case named trigger, [] = in this case anything it can find, 33 = radius




 
« Last Edit: 19 Feb 2011, 15:43:10 by F2kSel »