Since there is no radius option for the edit terrain object module (unlike the hide terrain object counter part), what would be the simplest way to go about destroying large parts of the map randomly?
The BIS destroy city function is very limited, so please don't recommend that. I think the edit terrain object has a lot of potential to create something like this.
You can test:
[ somePosition, someRadius] spawn {
_models = ("(gettext (_x >> 'destrType') == 'DestructNo') && {!(['ruins', configname _x] call Bis_fnc_inString )}" configClasses (configfile >> "CfgVehicles")) apply {(getText (_x >> "model") splitString "\")};
_models apply {reverse _x};
_models = _models apply { toLower (_x select 0)};
{
if ((getModelInfo _x) select 0 in _models) then {
_x hideObjectGlobal true
} else {
_x setDammage 1
}
} forEach (nearestTerrainObjects [ (_this select 0),[],(_this select 1)])
};
What you can't do with script :
- make a ruin if the ruin model (p3d) doesn't exist;
- change the ruin's model for something more realistic. Some Tanoa ruins are just looking like buildings with broken glasses...