mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
34 lines
785 B
Plaintext
34 lines
785 B
Plaintext
|
/*
|
||
|
DMS_fnc_FreezeToggle
|
||
|
created by eraser1
|
||
|
|
||
|
Usage:
|
||
|
[
|
||
|
_group, // GROUP: The AI Group to be frozen
|
||
|
_freeze // BOOL: "true" if you want to freeze, false if you want to un-freeze
|
||
|
] call DMS_fnc_FreezeToggle;
|
||
|
|
||
|
Freezes/un-freezes a specified group.
|
||
|
*/
|
||
|
|
||
|
if !(params
|
||
|
[
|
||
|
"_group",
|
||
|
"_freeze"
|
||
|
]) exitWith
|
||
|
{
|
||
|
diag_log format["DMS ERROR :: Calling DMS_fnc_FreezeToggle with invalid parameters: %1",_this];
|
||
|
};
|
||
|
|
||
|
if (_freeze) then
|
||
|
{
|
||
|
{_x enableSimulationGlobal false} forEach (units _group);
|
||
|
_group setVariable ["DMS_isGroupFrozen",true];
|
||
|
DMS_FrozenAIGroups pushBack _group;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
{_x enableSimulationGlobal true} forEach (units _group);
|
||
|
_group setVariable ["DMS_isGroupFrozen",false];
|
||
|
};
|