Skip to content

Disable AI

Mike-MF edited this page Jun 1, 2024 · 3 revisions

This page will explain the usage of the Disable AI function.


/*
 * Author: Mike
 * Faster method of using disableAI command.
 *
 * Features are on the wiki https://community.bistudio.com/wiki/disableAI
 *
 * Call from init.sqf
 *
 * Arguments:
 * 0: Groups or Units <ARRAY>
 * 1: Feature <STRING>
 *
 * Return Value:
 * None
 *
 * Example:
 * [[My_Group_One, My_Group_Two], "PATH"] call MFUNC(disableAI)
 * [[My_Group_One, My_Unit_One], "AUTOCOMBAT"] call MFUNC(disableAI)
 */

Usage

The disable AI function allows you to easily disable certain types of group AI behaviour via the function instead of using the forEach loops. It can take an array of units and groups.

Example From External Files:

[[My_Group_One, My_Group_Two], "PATH"] call MFUNC(disableAI);

Example From Trigger:

[[My_Group_One, My_Group_Two], "PATH"] call TAC_Mission_fnc_disableAI;

This should be called globally from trigger or via init.sqf

Clone this wiki locally