Jump to content
Sign in to follow this  
TheHutch

Delay AI from combat at mission start

Recommended Posts

I'm trying to keep AI on opposing sides to start shooting at each other as soon as the mission starts. I started off with a simple:

group setCombatMode "BLUE";
sleep 60;
group setCombatMode "RED";

in each group's init box, but it apparently isn't quite that simple. I'm using Olsen's and I don't know exactly the right place to put this type of script in .sqf files if not in units' init boxes. 

Any suggestions for a code that works as efficiently as possible?

Share this post


Link to post

also tried

this setCombatMode "BLUE";
waitUntil {time >= 60};
this setCombatMode "RED";

but a million different slices return "generic expression error"

Share this post


Link to post
if (local this) then {group this setCombatMode "BLUE"; [{group _this setCombatMode "RED";}, this, 60] call CBA_fnc_waitAndExecute;};

Put this code in group leader's init field.

 

Code from init field is ran in unscheduled environment, so using commands like waitUntil or sleep will produce errors.

Share this post


Link to post

Do keep in mind the AI sometimes sees combatMode as a minor hurdle on its way to fuck up everything you've worked hard to do, so test it thoroughly. For instance, fire if fired upon is a fantasy at best.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...