Jump to content
Sign in to follow this  
bravo409

Ai seeing at night not fixed

Recommended Posts

I'm running Bcombat AI MOD and made simple test,this test was a test of AI seeing without nvgs. So made opfor without nvgs with a lottier waypoint and had my AI team with me with silenced weapons and we came around the corner and saw AI moving our way and then the enemy AI opened up on us. Now I had cloudy skys with rain and dark as hell and they still saw me in the pitch black. Now I'm just pissed cause seems like stealth missions will not happen. Anyone on here have any ideas or mods that fix this thanks.

Share this post


Link to post
Share on other sites

Sure its fixed. If you set up the AI properly they are not able to see anything at night. Just use setSkill, as Semiconductor already suggested, and set spottingDistance/spottingTime to something like 0.2 and you are fine.

Share this post


Link to post
Share on other sites

Maybe it's the bcombat or too high skill level on AI? Because I just tried this and I could run towards 3 ungrouped enemies without nvgs on an open airfield and they had no clue I was right in front of them until I was under 30m away. Even then it took a while before they opened fire. I could take them all out one by one with headshots without them reacting.

Perhaps the 30m is a bit unrealistic and too much for good stealth missions on a pitch black rainy night, but it's not totally broken.

Share this post


Link to post
Share on other sites
Maybe it's the bcombat or too high skill level on AI? Because I just tried this and I could run towards 3 ungrouped enemies without nvgs on an open airfield and they had no clue I was right in front of them until I was under 30m away. Even then it took a while before they opened fire. I could take them all out one by one with headshots without them reacting.

Perhaps the 30m is a bit unrealistic and too much for good stealth missions on a pitch black rainy night, but it's not totally broken.

Ok so how do I write this code not privy with scripting could you show me what I would have to write sorry thank you? Also does this skillset go in the Ai init or is it sqf only?

Edited by bravo409

Share this post


Link to post
Share on other sites
Ok so how do I write this code not privy with scripting could you show me what I would have to write sorry thank you? Also does this skillset go in the Ai init or is it sqf only?

No code needed. I just had the AI level at normal in the game difficulty settings and AI units' general skill slider at the middle default value.

You can fine tune the sub-skills with the setskill command if you want.

In the AI init field: this setskill ["spotDistance",x]; where x is a value from 0 to 1. 1 being the highest spot distance. The current value depends on your game difficulty settings and the AI skill slider.

Share this post


Link to post
Share on other sites

I confirm with bcombat the AI sees better than day (without NVG of course)

Share this post


Link to post
Share on other sites

Another quick solution in addition to Greenfist's: put this code into mission's init.sqf, it will change "spotting skills" of each and every AI uint:

{
   _x setSkill["spotDistance", 0.1];
   _x setSkill["spotTime", 0.1];
} foreach allUnits;

Since it's hard to guess correct skill, feel free to play around with values (they can be between 0 and 1, bigger value means better skill) until desireable effect is achieved. :)

Share this post


Link to post
Share on other sites

Or if you want just the enemies to be blind (in SP): :)

{ 
   if (side player != side _x) then {
   _x setSkill["spotDistance", 0.1];
   _x setSkill["spotTime", 0.1];
   };
} foreach allUnits;

Share this post


Link to post
Share on other sites

Nice remark Greenfist, I'm totally forgot about friendly AI.

Edited by Semiconductor

Share this post


Link to post
Share on other sites

the thing is... we shouldnt really have to use the setskill command

Share this post


Link to post
Share on other sites
the thing is... we shouldnt really have to use the setskill command

And the good thing is we don't have to use it. :)

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  

×