Jump to content
Sign in to follow this  
Rcaddy114

AI Flashlights

Recommended Posts

In the arma 3 editor, is there a way to force AI units to use the flashlights mounted on their weapons? If so, how? I've searched but had no luck.

Share this post


Link to post
Share on other sites

i have the same issue and i think the flashlights are underpowered anyway its more of a signal to let the enemy know where you are

Share this post


Link to post
Share on other sites

You can take this code I stole from the Night showcase and put it in your init.sqf:

{
private "_unit";
_unit = _x;

if (side _unit != WEST) then {
	_unit unassignItem "NVGoggles";
	_unit removeItem "NVGoggles";
	_unit removeWeapon "Binocular";
	_unit unassignItem "acc_pointer_IR";
	_unit removePrimaryWeaponItem "acc_pointer_IR";
	_unit addPrimaryWeaponItem "acc_flashlight";
	_unit assignItem "acc_flashlight";
	_unit enableGunLights "ForceOn";

	//Manual skill
	_unit setSkill ["aimingAccuracy", 0.2];
	_unit setSkill ["aimingShake", 0.2];
	_unit setSkill ["aimingSpeed", 0.2];

	//Remove optics
	{
		private "_type";
		_type = getNumber (configFile >> "CfgWeapons" >> _x >> "ItemInfo" >> "type");

		if (_type == 201) then {
			_unit removePrimaryWeaponItem _x;
		};
	} forEach primaryWeaponItems _unit;
};
} foreach allunits;

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
Sign in to follow this  

×