Jump to content

Remove all smokes included modded from AI on OPFOR

Recommended Posts

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

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.




These commands help find if "smoke" is in a magazine's display name.

  • Like 3

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now