dimdic 1 Posted October 11, 2012 Hi! Is there any way to delete all objects & units inside a specific area of my map ? Thank you. Share this post Link to post Share on other sites
Horner 13 Posted October 11, 2012 http://community.bistudio.com/wiki/nearestObjects Share this post Link to post Share on other sites
kylania 568 Posted October 11, 2012 There's also BIS_fnc_destroyCity for ruining a bunch of buildings. Share this post Link to post Share on other sites
rejenorst 18 Posted October 12, 2012 Well you could use the objectstodestroy = nearestobjects variable (as Horner suggested) from a given position and distance which would save the data into an array then you could just {_x setdammage 1} foreach objectstodestroy; Share this post Link to post Share on other sites
Horner 13 Posted October 12, 2012 @Rej I think he wanted to delete them. So you'd probably compile them into an array with nearestObjects then use this. {deleteVehicle _x;} forEach _array; Share this post Link to post Share on other sites
dimdic 1 Posted October 15, 2012 Yes Horner !! That's true! I wanted to delete them! The important thing was the idea of using the command "nearestObjects" !! Thank you a lot! @RejI think he wanted to delete them. So you'd probably compile them into an array with nearestObjects then use this. {deleteVehicle _x;} forEach _array; Share this post Link to post Share on other sites
shuko 59 Posted October 15, 2012 Remember to delete the crew of a vehicle before deleting the vehicle itself or else you'll end up with the crew still in the area. Share this post Link to post Share on other sites
rejenorst 18 Posted October 15, 2012 Ah yeah sorry in that case as Horner says: {deleteVehicle _x;} forEach _array; Share this post Link to post Share on other sites
Horner 13 Posted October 15, 2012 What shuko said. Make sure you use that foreach command first. { { deleteVehicle _x; } forEach (crew _x); } forEach (nearestObjects [getPos _pos, ["LandVehicle","Ship","Air","Tank"], 500]); Share this post Link to post Share on other sites