Advertisement

Author Topic: how can i stop IA from going prone every time an aircraft passes  (Read 1366 times)

0 Members and 1 Guest are viewing this topic.

Offline Michael

  • Members
  • *
  • www.zonekiller.ath.cx
    • ZoneKillers
there does not seem to be a way to override combat mode except to go up to stealth mode
i did however have some success by changing the setCombatMode to green whenever they
went to combat mode and they still moved forward better than they did without this script.
it also shows what modes the AI are in.

in the init field of the AI leader put

Code: [Select]

[this] execVM "courage.sqf"


Put this in a script called courage.sqf in the mission folder

Code: [Select]

_leader = _this select 0;

_grp = group _leader;

_l = 0;

while {(count units _grp > 0)} do
{

_b = behaviour leader _grp;
_c = combatMode _grp;
_num = count units _grp;

if (behaviour leader _grp == "AWARE") then {_grp setCombatMode "YELLOW"; _l = 0};

hint format["Behaviour Mode : %1  \nCombat Mode : %2 \nLoops : %3 \nTroops : %4",_b , _c , _l , _num];

waituntil {!(behaviour leader _grp == "AWARE")};

if (behaviour leader _grp == "COMBAT") then {_grp setCombatMode "GREEN"};
sleep .5;
_l = _l + 1;
_grp setBehaviour "AWARE"; _b = behaviour leader _grp; _c = combatMode _grp; hint format["Behaviour Mode : %1  \nCombat Mode : %2 \nLoops : %3 \nTroops : %4",_b , _c , _l , _num];
sleep .5;
};


it helps a little i think.

Offline Knight Trane

  • Members
  • *
Would something like this work to keep AI Civies from running from WP to WP.  I only want them to run when theres something to run from.   i.e. Troops! or exploded ordnance.

Offline Michael

  • Members
  • *
  • www.zonekiller.ath.cx
    • ZoneKillers
Yes you will be able to give the civs an order on the change of mode they are in

waituntil {!(behaviour leader _grp == "AWARE")};

_grp domove _pos;

Offline Knight Trane

  • Members
  • *
Thanx, will try when I get a chance.

Offline D007

  • Members
  • *
ALso you could follow this method at the following link.

http://community.bistudio.com/wiki/disableAI. gl