Jump to content
Sign in to follow this  
Phantom Six

enableGunLights Forceon sometimes work?

Recommended Posts

Is it only me or when I use

this enableGunLights "forceOn";

Sometimes only 1 of the squad member walk around with his flashlight on. Sometimes they all do. Sometimes none of them do. I made sure they all have flashlights. Its pretty random if their flashlights on force on or not on their patrols.

this addPrimaryWeaponItem "acc_flashlight";
this unassignItem "NVGoggles_OPFOR"; 
this removeItem "NVGoggles_OPFOR";

Share this post


Link to post
Share on other sites

I only got it to work as long as the group is in combat mode, and even then it takes from 3 to 10 seconds until every unit from the group turned on the flashlight.

Share this post


Link to post
Share on other sites

What's "this"? If it's a unit try this code:

{_x enableGunLights "forceOn"} foreach (units group this);

When you use "AUTO" it will only turn on once the group is in combat mode and does not have NVGs. Using forceOn should work regardless if they have NVGs and/or CM but make sure to use a properly defined group name (grouo = group this) or a single unit. (Source)

Share this post


Link to post
Share on other sites
What's "this"? If it's a unit try this code:

{_x enableGunLights "forceOn"} foreach (units group this);

When you use "AUTO" it will only turn on once the group is in combat mode and does not have NVGs. Using forceOn should work regardless if they have NVGs and/or CM but make sure to use a properly defined group name (grouo = group this) or a single unit. (Source)

Yes. That's the code.

But I have getting troble since sometimes unit will not light their gunlights

Share this post


Link to post
Share on other sites

I have a feeling that it "might" only work sometimes due to the fact that the code is executed before the AI have the lights on their guns. Reason I say this is that you are adding onto their guns the lights and they are not on their by default, I know that this does sound untrue but it could be the reason.

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  

×