acoustic 82 Posted October 13, 2016 I've searched and searched to find something and came up short. I've messed around with the fnc_destroyCity but it does not destroy nearly enough buildings. I am really going for a war torn look. Any ideas? Share this post Link to post Share on other sites
Guest Posted October 13, 2016 I've searched and searched to find something and came up short. I've messed around with the fnc_destroyCity but it does not destroy nearly enough buildings. I am really going for a war torn look. Any ideas? You may try somthing like _houses = nearestTerrainObjects [player, ["House"], 200]; //You may replace player with any object or location { _x setDamage 1 } count _houses; https://community.bistudio.com/wiki/nearestTerrainObjects Share this post Link to post Share on other sites
Tajin 349 Posted October 13, 2016 https://community.bistudio.com/wiki/nearestTerrainObjects something like this: { _x setDamage 1; } count (nearestTerrainObjects [[worldsize/2,worldsize/2,0]], ["House"], worldSize]); @ harmdhast, you beat me to it :P Share this post Link to post Share on other sites
haleks 8212 Posted October 13, 2016 Beware though, for maps with a lot of objects it will cause stability issues - and forget SP with this, you won't be able to save so many modifications. Share this post Link to post Share on other sites
Bnae 1431 Posted October 13, 2016 /* Author: BNAE Description: Destroy selected buildings on the start */ B_types = [ "Land_Chapel_V1_F", "Land_Chapel_V2_F", "Land_i_House_Big_01_V1_F", "Land_i_House_Big_01_V2_F", "Land_i_House_Big_01_V3_F", "Land_i_House_Big_02_V1_F", "Land_i_House_Big_02_V2_F", "Land_i_House_Big_02_V3_F", "Land_i_Shop_01_V1_F", "Land_i_Shop_01_V2_F", "Land_i_Shop_01_V3_F", "Land_i_Shop_02_V1_F", "Land_i_Shop_02_V2_F", "Land_i_Shop_02_V3_F", "Land_i_House_Small_01_V1_F", "Land_i_House_Small_01_V2_F", "Land_i_House_Small_01_V3_F", "Land_i_House_Small_02_V1_F", "Land_i_House_Small_02_V2_F", "Land_i_House_Small_02_V3_F" ]; fn_destroyall_sofia = { [] spawn{ systemChat "Starting to destroy Sofia.."; for [{_i=0},{_i < (count B_types)},{_i=_i+1}] do { _building = getMarkerPos "DESTROYALL_SOFIA" nearObjects [B_types select _i, 300]; sleep 7; {_x setDamage 1} forEach _building; }; systemChat "Sofia - Ready"; call fn_destroyall_paros; }; }; fn_destroyall_paros = { [] spawn{ systemChat "Starting to destroy Paros.."; for [{_i=0},{_i < (count B_types)},{_i=_i+1}] do { _building = getMarkerPos "DESTROYALL_PAROS" nearObjects [B_types select _i, 500]; sleep 7; {_x setDamage 1} forEach _building; }; systemChat "Paros - Ready"; }; }; Add more buildings to the list, increase radius, enjoy low FPS Share this post Link to post Share on other sites
Guest Posted October 13, 2016 Would it be better using hide object and make the destroyed building spawn in place of the first one ? Share this post Link to post Share on other sites
Devastator_cm 434 Posted October 13, 2016 btw, why it causes low fps?I can understand it during the script running it can reduce fps due to animations but after all destroyed fps should be normal or am I missing a point? 1 Share this post Link to post Share on other sites
haleks 8212 Posted October 13, 2016 Would it be better using hide object and make the destroyed building spawn in place of the first one ? I don't think so; you're basically doubling the amount of objects on the map. Share this post Link to post Share on other sites
Guest Posted October 13, 2016 I don't think so; you're basically doubling the amount of objects on the map. Could be better than running a destruction animation. Share this post Link to post Share on other sites
R3vo 2654 Posted October 13, 2016 Wasn't the issue with destoyed buildings reducing FPS solved long ago? At least I haven't heard any complaints about that in a while. Share this post Link to post Share on other sites
Devastator_cm 434 Posted October 13, 2016 aha so there was a bug :) Thanks for info Share this post Link to post Share on other sites
acoustic 82 Posted October 13, 2016 Messed around with BNAe's script and others. Any time you go over a significant amount of radius, it crashes. And that's just buildings, not even other objects as well (which I forgot to add in the OP). Does Eden not have a feature that makes this simple and doesn't cause crashes? Simply just want a war torn look on the map. Buildings, objects ect. Gonna mess around with Eden and see what I come up with. Share this post Link to post Share on other sites
cuel 25 Posted October 14, 2016 Destroy the towns when needed (player approaches). Don't destroy them all at once Share this post Link to post Share on other sites
Bnae 1431 Posted October 14, 2016 As you can see in my example you can destroy one city at a time with one building type at a time to avoid any minor issues. Should work just fine if you're trying to create "immersive" cities. It'll take awhile but it works like a charm for the purpose. Share this post Link to post Share on other sites
acoustic 82 Posted October 15, 2016 Seems somewhat complicated but if its the best way, then Ill give it a go. Appreciate it. Share this post Link to post Share on other sites
-ami- mofo 13 Posted August 24, 2017 Hmmm can't get this to work. Tested it just on the town of Sofia.. Trigger activated by blufor with... Quote _null = [] execVM "destruction.sqf"; A marker in the middle of Sofia called Quote DESTROYALL_SOFIA then this in a 'destruction.sqf' file in the mission folder.. Quote B_types = [ "Land_Chapel_V1_F", "Land_Chapel_V2_F", "Land_i_House_Big_01_V1_F", "Land_i_House_Big_01_V2_F", "Land_i_House_Big_01_V3_F", "Land_i_House_Big_02_V1_F", "Land_i_House_Big_02_V2_F", "Land_i_House_Big_02_V3_F", "Land_i_Shop_01_V1_F", "Land_i_Shop_01_V2_F", "Land_i_Shop_01_V3_F", "Land_i_Shop_02_V1_F", "Land_i_Shop_02_V2_F", "Land_i_Shop_02_V3_F", "Land_i_House_Small_01_V1_F", "Land_i_House_Small_01_V2_F", "Land_i_House_Small_01_V3_F", "Land_i_House_Small_02_V1_F", "Land_i_House_Small_02_V2_F", "Land_i_House_Small_02_V3_F" ]; fn_destroyall_sofia = { [] spawn{ systemChat "Starting to destroy Sofia.."; for [{_i=0},{_i < (count B_types)},{_i=_i+1}] do { _building = getMarkerPos "DESTROYALL_SOFIA" nearObjects [B_types select _i, 300]; sleep 7; {_x setDamage 1} forEach _building; }; systemChat "Sofia - Ready"; Nothing happens at all. Any ideas what I've done incorrectly? Share this post Link to post Share on other sites
h - 169 Posted August 24, 2017 (edited) First, you're missing two }; You're not closing the fn_destroyall_sofia = { nor [] spawn{ Second, even if that is fixed the script doesn't do what you want because what your script does is it defines a function called fn_destroyall_sofia, that's all. Calling that function would destroy the buildings.. EDIT: Also, since you execute the script with execVM it's already in scheduled environment so you don't need the spawn there either.. So, change your script to this (should work): B_types = [ "Land_Chapel_V1_F", "Land_Chapel_V2_F", "Land_i_House_Big_01_V1_F", "Land_i_House_Big_01_V2_F", "Land_i_House_Big_01_V3_F", "Land_i_House_Big_02_V1_F", "Land_i_House_Big_02_V2_F", "Land_i_House_Big_02_V3_F", "Land_i_Shop_01_V1_F", "Land_i_Shop_01_V2_F", "Land_i_Shop_01_V3_F", "Land_i_Shop_02_V1_F", "Land_i_Shop_02_V2_F", "Land_i_Shop_02_V3_F", "Land_i_House_Small_01_V1_F", "Land_i_House_Small_01_V2_F", "Land_i_House_Small_01_V3_F", "Land_i_House_Small_02_V1_F", "Land_i_House_Small_02_V2_F", "Land_i_House_Small_02_V3_F" ]; systemChat "Starting to destroy Sofia.."; for [{_i = 0}, {_i < (count B_types)}, {_i = _i + 1}] do { private _building = getMarkerPos "destroyall_sofia" nearObjects [B_types select _i, 300]; sleep 7; {_x setDamage 1} forEach _building; }; systemChat "Sofia - Ready"; Edited August 24, 2017 by h - Share this post Link to post Share on other sites
-ami- mofo 13 Posted August 24, 2017 Thanks a lot h.. works like a charm now :-) Share this post Link to post Share on other sites
R3vo 2654 Posted August 24, 2017 There is also a new module on devbranch which allows you to destroy buildings in its area. 1 Share this post Link to post Share on other sites
miasdad 94 Posted October 7, 2019 On 8/24/2017 at 2:22 PM, R3vo said: There is also a new module on devbranch which allows you to destroy buildings in its area. Is that the environment module(edit terrain object)in Eden?If so how do you use it if you want the entire city leveled,instead of just one object?Haleks Ravage mod does a good job as far as damage but I want to level the entire city Share this post Link to post Share on other sites
haleks 8212 Posted October 7, 2019 59 minutes ago, miasdad said: Is that the environment module(edit terrain object)in Eden?If so how do you use it if you want the entire city leveled,instead of just one object?Haleks Ravage mod does a good job as far as damage but I want to level the entire city Always happy to help destroying stuff! Here's a ready-to-use function : //example : [getpos somelogic, 1000, 1] call myFunction to level everything, or : //[getpos somelogic, 1000, 0.75] call myFunction to damage everything myFunction = { params ["_pos", "_radius", "_dam"]; _arr = [ "BUILDING", "HOUSE", "CHURCH", "CHAPEL", "BUNKER", "FORTRESS", "VIEW-TOWER", "LIGHTHOUSE", "FUELSTATION", "HOSPITAL", "WALL", "HIDE", "BUSSTOP", "STACK", "TOURISM", "WATERTOWER", "POWER LINES", "POWERSOLAR" ]; { _x setDamage [_dam, false] } forEach (nearestTerrainObjects [_pos, _arr, _radius,false]); true }; I'm pretty sure nothing will survive that - although keep in mind that some buildings may not have a proper "damaged" model (mostly structures from Tanoa). 4 Share this post Link to post Share on other sites
miasdad 94 Posted October 7, 2019 Many Thanks Haleks!Your the best! Share this post Link to post Share on other sites