From 9bf1807b18f68fbe9b4f63e5413815305a01a138 Mon Sep 17 00:00:00 2001 From: He-Man Date: Wed, 4 Sep 2019 22:14:37 +0200 Subject: [PATCH] Tweaked RemoveTrees Script --- Tools/RemoveTreesAround.sqf | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Tools/RemoveTreesAround.sqf b/Tools/RemoveTreesAround.sqf index f197a47..eca301b 100644 --- a/Tools/RemoveTreesAround.sqf +++ b/Tools/RemoveTreesAround.sqf @@ -1,12 +1,10 @@ _pos = getpos player; -_alltrees = nearestobjects [_pos,[],25]; +_nearobjs = nearestobjects [_pos,[],25]; { -_pinus = ['pinus',str _x] call BIS_fnc_inString; -_ficus = ['ficus',str _x] call BIS_fnc_inString; -_wreck = ['wreck',str _x] call BIS_fnc_inString; -_stone = ['stone',str _x] call BIS_fnc_inString; -if (_pinus || _ficus || _wreck || _stone) then { -_x hideObjectGlobal true; -}; - -} foreach _alltrees; \ No newline at end of file + _obj = _x; + { + if (tolower (str _obj) find _x > -1) exitwith { + _obj hideObjectGlobal true; + }; + } foreach ["pinus","ficus","wreck","stone"]; +} foreach _nearobjs; \ No newline at end of file