Benneb 10 Posted August 3, 2009 Hello All, Does anyone know how to remove a building from the map without using the deletecollection command? I would really like for anyone that played my mission to not have to switch maps to utes and back again before they can play any other map. Share this post Link to post Share on other sites
kylania 568 Posted August 3, 2009 You can blow one up using this setDamage 1 but what do you mean by switching maps like that? Share this post Link to post Share on other sites
Benneb 10 Posted August 3, 2009 If you remove the collection then next time you load a map on the same island it will still be gone. you need to load the other island or reload the game to get the objects back. And i dont want to use setdamage as i want to completeley remove the objects. I tried moving them elsewhere but had no luck with that either. Share this post Link to post Share on other sites
kylania 568 Posted August 3, 2009 Ohh, never used that deleteCollection thing. Odd. You could do the time honored tradition of stacking crap in front of it. :) Share this post Link to post Share on other sites
f2k sel 164 Posted August 3, 2009 You can blow one up using this setDamage 1 but what do you mean by switching maps like that? You can remove a build or most objects except grass using a combination of deletecollection and nearestobject. But to put it back you do have to change maps. I have tried to move the builds but didn't have any luck, I was thinking I could put them back later. Share this post Link to post Share on other sites
Benneb 10 Posted August 3, 2009 (edited) Ok, been playing with this for a while now. Seems you can use attachto on pre placed buildings. So far managed to attach a cities worth of buildings to a btr. :E Edit: But it seems they dont get put back and it doesnt work for fences Edited August 3, 2009 by Benneb Share this post Link to post Share on other sites
f2k sel 164 Posted August 3, 2009 Does look funny though. Share this post Link to post Share on other sites
Benneb 10 Posted August 4, 2009 Aye it does. Anyway, during my testing i found it best to attach them all to a person then bury said person about 200 down in the sea at [0,0,-200]. Problems being as i said; they dont get put back. So i do not see any advantage to using attachTo instead of deleteCollection. Does anyone know of any other ways to remove buildings? Or even a way to reload the map after the mission is done? Fake edit: Just had a thought. What about this method: For each building in the area to clear, create a can (or something equally small) in the center of said building Attach the building to the object. Move the object -200 into the ground. Then at the end of the mission/map, reverse the process. Only problem i can forsee is that is still doesnt work for fences or sign posts... And before it is asked, the reason i want to do this is to replace Baltoa with a military base. Share this post Link to post Share on other sites
f2k sel 164 Posted August 4, 2009 Some objects won't attach using the attach command. JDog found an interesting command though object attachto[unitname] is attaches the object relative to it's position. so you can try and attach all buildings to that single unit and sink him and they may all drop and you only have to put him back and the buildings should return. It would be easier than creating loads of objects at given points. I haven't tested it but it may work. Share this post Link to post Share on other sites
Benneb 10 Posted August 4, 2009 good idea, ill give that a try. Also, is it possible to make something invisile and uncollidable? Share this post Link to post Share on other sites
LJF 0 Posted August 7, 2009 Hey how do you set the damage of an object like a building? I'm trying to destroy the entire city of Chernorgorsk and bombs are really innefective (and crash my game - about 200-300 of them). Also, does anyone know how to remove trees? Share this post Link to post Share on other sites
f2k sel 164 Posted August 7, 2009 Just save this as killit.sqf and then in a trigger place nul=[destroy,30] execVM "killit.sqf" 30 is the size of destruction. place a game logic where you want the action to take place and name it destroy // nul=[destroy,130] execVM "killit.sqf" _pos = _this select 0; // position of game logic _dist = _this select 1; // radius of destruction _static = nearestobjects [_pos,[], _dist]; {_x setdammage 1} foreach _static; Warning Large numbers will really slow performance of the PC. Share this post Link to post Share on other sites
Cellus 10 Posted August 7, 2009 Hey how do you set the damage of an object like a building? I'm trying to destroy the entire city of Chernorgorsk and bombs are really innefective (and crash my game - about 200-300 of them).Also, does anyone know how to remove trees? Stolen from elsewhere on these boards: // place a game logic where you want to destroy the trees and pass gamelogic name and the radius of detruction. // nul=[location,radius] execVM"gclear.sqf" _location = _this select 0; _radius = _this select 1; _what = (nearestObjects [_location,[],_radius]) - ((getPos _location) nearObjects _radius); sleep 1.5; {_x setdammage (1.0)} forEach _what; Heh - too late ;) Share this post Link to post Share on other sites
LJF 0 Posted August 7, 2009 Thanks, that's brilliant, exactly what I was looking for. Large numbers will really slow performance It does run better than 300 LGB's though :D Share this post Link to post Share on other sites