Want to delete mines after mission ends

Want to delete mines after mission ends

« posted: May 02, 2020, 10:01 AM »
Hello

I have some missions which are using "addDefensiveMines.sqf" which spawn defined mines around mission center.
but unfortunately after mission end , the mines still stay there.

Before mission starts i am using
Code: [Select]
_baseToDelete = nearestObjects [_missionPos, ["All"], 30];
{ deleteVehicle _x } forEach _baseToDelete;
To delete everything before mission starts
So i tried to modify it
Code: [Select]
    _baseToDelete = nearestObjects [_missionPos, ["ATMine_Range_Mag"], 50];
    { deleteVehicle _x } forEach [_baseToDelete];
But nothings works, any idea how to delete specific object like mines wihin 100m radius?
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2600

Re: Want to delete mines after mission ends

« Reply #1 posted: May 04, 2020, 05:00 AM »
try this

Code: [Select]
_baseToDelete = _missionPos nearObjects ["MineBase", 50];
{ deleteVehicle _x } forEach _baseToDelete;

Re: Want to delete mines after mission ends

« Reply #2 posted: May 04, 2020, 01:54 PM »
try this

Code: [Select]
_baseToDelete = _missionPos nearObjects ["MineBase", 50];
{ deleteVehicle _x } forEach _baseToDelete;

Thank you AgentRev, it works :)