Reinforcements - Theseus-Aegis/MissionTemplate GitHub Wiki
This page will explain the usage of the Reinforcements function.
/*
* Author: Jonpas, Mike
* Sets visibility of units, simulation and AI behaviour of a group along with any vehicles manned by the group.
* Call from initServer.sqf
*
* Arguments:
* 0: Groups <ARRAY>
* 1: Disable <BOOL> (default: true)
* 2: Distance <NUMBER> (default: 0)
*
* Return Value:
* None
*
* Example:
* [[Group_1, Group_2]] call MFUNC(reinforcements)
* [[Group_1, Group_2], false] call MFUNC(reinforcements)
* [[Group_1, Group_2], false, 50] call MFUNC(reinforcements)
*/This function will hide or unhide a group of units for use later, preserving behaviour, loadouts and waypoints. Will also do the same to vehicles provided a group member is inside one.
Reinforcements has a failsafe for unhiding more than 2 groups at once as this causes lagspikes/desync. This will simply pass your groups to reinforcementWaves with a 1.5s delay per group.
Call from trigger with Server check or initServer.sqf
Examples:
[My_Group] call MFUNC(reinforcements); // Will hide units.if (!isServer) exitWith {};
[My_Group, false] call TAC_Mission_fnc_reinforcements; // Will unhide units via TriggerMultiple Groups
// Hiding Groups
[[My_Group_One, My_Group_Two]] call MFUNC(reinforcements);
// Unhiding Groups (via Trigger)
if (!isServer) exitWith {};
[[My_Group_One, My_Group_Two], false] call TAC_Mission_fnc_reinforcements;Staggered unhiding
For staggered unhiding see the Reinforcement Waves function.