Reaction - Theseus-Aegis/MissionTemplate GitHub Wiki
This page will explain the usage of the Reaction function.
/*
* Author: Mike
* Adds reaction EventHandlers to AI for Patrols, Static Units or Enabling movement in combat.
* Types are: "Patrol", "Static" or "Combat"
* Static will increase AI knowledge of shooter immediately to full for quicker return fire.
* Patrol will have any AI moving give up their waypoints and move to engage the shooter.
* Combat will enable AI to move when entering combat mode.
*
* Call from init.sqf
*
* Arguments:
* 0: Types <ARRAY> (default: [])
* 1: Groups <ARRAY>
*
* Return Value:
* None
*
* Example:
* [["Static"], [My_Group_One, My_Group_Two]] call MFUNC(reaction)
* [["Patrol", "Combat"], [My_Group_One]] call MFUNC(reaction)
*/
This function will make AI more reactive to fire. It has 3 modes "Static", "Patrol" and "Combat".
- Static mode is for AI with movement disabled, increasing AI knowledge of who is firing at them immediately for faster returned fire.
- Patrol mode is for any moving AI to give up their waypoints and move directly to engage the shooter.
- Combat mode is for AI with movement or pathing disabled, upon entering combat they will be allowed to move again.
Call from init.sqf
Example:
[["Static"], [My_Group_One]] call MFUNC(reaction);
Extended Example:
[["Static", "Patrol"], [My_Group_One, My_Group_Two, My_Group_Three]] call MFUNC(reaction);