Jump to content
Sign in to follow this  
dimdic

Opfor units don't fire (strange AI behaviour) !!

Recommended Posts

I have created a mission where a M113 vehicle is driven by the player. At a moment a trigger activates an ied 10 meters in front of the m113 and a script file is executed ! I have positioned opfor units behind some rocks near the ied. Their preferences are : CombatMode never fire, behaviour: safe, stance: prone, and initialization statements: disableAI "MOVE". The script of the code is this :

{
if ( (side _x==east) ) then {

    _x enableAI "MOVE";
    _x setUnitPos "AUTO";

    _x setSkill 1;
    _x setSkill ["SpotDistance",1];
    _x setSkill ["AimingAccuracy",1];
    _x allowFleeing 0;

    _x setBehaviour "AWARE";
    _x setCombatMode "RED";
    _x reveal player;
    _x reveal (vehicle player);
    _x doFire (vehicle player);
    forceRefreshTargets (group _x);
    };
}forEach allUnits;


The problem is that opfor units DON'T fire their weapon (they do nothing) which is very strange. I want them to fire against M113. Opfor units are not in a group. What shall i do to work properly ?? Thank you.

Share this post


Link to post
Share on other sites

Do your OPFOR have RPGs? They certainly aren't going to waste time plinking away at an armored vehicle with small arms.

Share this post


Link to post
Share on other sites

Only one of them has rpg. The others have rifle !!! Is that the problem ??

Do your OPFOR have RPGs? They certainly aren't going to waste time plinking away at an armored vehicle with small arms.

Share this post


Link to post
Share on other sites

What is this command forceRefreshTargets (group _x);

I find no reference to it and it gives an error in game which is probably why the script fails.

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  

×