It works extremely well, and gives the players more enticement to actually do missions (along side my new crate load out script), as by default, the AI now have semi-decent to decent gear, therefore they will be harder to kill, but the reward is better.

*See _opticsDisallow option to REMOVE optics from the random optic list.My question wasn't the removal of it, more so the allowance of which optics. Because there is no define "allowedOptics" in the script. Which you answered in the below quote.

Quote

If you also see the code, it grabs ALL available optics for said weapon, and then removes the _opticsDisallow optics from the array...

With the _opticsDisallow variable, I grabbed the optic list from the config file (APEX), and pasted those in. Some are commented out as to allow them to be equipped on to the primary weapon should that weapon have any compatible optics, as every weapon is different.

Therefore, if the TWS is in the optic array for said primary weapon, then the _opticDisallow portion removes the TWS from the array (before it randomly chooses one) in order to disallow it. There is no need for an _opticAllow array.

I'm not sure on how else to explain things.

Quote

However on a few custom missions that have a different set up, it's only working on 1 AI (Leader I'm Assuming).

_leader = _group createUnit ["C_man_polo_1_F", [(_pos select 0) + 10, _pos select 1, 0], [], 1, "Form"];As there would be no need for a manual loadOut... my script/function does that for you in the forEach loop.