Stank4K 2 Posted January 14, 2020 Looking for a script to remove all AI smokes from OPFOR at the Init level. I've been digging for ages and have only found failed scripts and not much else to go off of. I'd like to remove all smokes from all OPFOR AI at mission start. They are very smoke happy and it causes FPS issues, Lag, and it's just annoying to stop a firefight for 2 or 3 minutes for enemy smoke to clear. I was happy removing them all by hand via the edit load-out option in the right click menu when we were working with a smaller squad with smaller missions. But we have grown enough for there to be 60-100 enemy's at a time and doing it by hand just isn't an option anymore. I've given it a whack, but I'm not sure what the smokes ID is for each one. Or how to find them. There must be a better way to remove all than to name each smoke ID and remove it. If there isn't, if one of you wonderful people over here would like to set me up with a basic script with 2 or 3 vanilla names, and the knowledge on how to find all the other IDs, I'll gladly add the rest of them myself. Thanks in advance! Share this post Link to post Share on other sites
beno_83au 1369 Posted January 14, 2020 You could check their display names and remove the magazine if it has the word "smoke" in it: { private _unit = _x; if (side _unit == EAST) then { { private _magazine = _x; if ("smoke" in (toLower (getText (configfile >> "CfgMagazines" >> _magazine >> "DisplayName")))) then { _unit removeMagazineGlobal _magazine; }; } forEach (magazines _unit); }; } forEach allUnits; Run this from initServer.sqf and it should get rid of all their smoke grenades. https://community.bistudio.com/wiki/in https://community.bistudio.com/wiki/getText https://community.bistudio.com/wiki/configFile These commands help find if "smoke" is in a magazine's display name. 3 Share this post Link to post Share on other sites
Stank4K 2 Posted January 14, 2020 Thanks a ton! @beno_83au Been raging over this for ages now. You are a god amidst men. 1 Share this post Link to post Share on other sites