Skip to content

Instantly share code, notes, and snippets.

@commy2
Created July 3, 2020 12:38
Show Gist options
  • Save commy2/55af7110c31ca8b42b5f400df8106b72 to your computer and use it in GitHub Desktop.
Save commy2/55af7110c31ca8b42b5f400df8106b72 to your computer and use it in GitHub Desktop.
/*
init.sqf
Trigger: PuEiSta
*/
if (isServer) then {
0 spawn {
waitUntil {
waitUntil {
// Transition to "Blue controlled" state
private _units = allUnits inAreaArray PuEiSta;
{side group _x == west} count _units > 0 &&
{side group _x == east} count _units == 0
};
// State "Blue controlled"
execVM "Scripte\BluWaPuEins.sqf"
waitUntil {
// Transition to "Red controlled" state
private _units = allUnits inAreaArray PuEiSta;
{side group _x == west} count _units == 0 &&
{side group _x == east} count _units > 0
};
// State "Red controlled"
execVM "Scripte\OpfWaPuEins.sqf"
false // repeat endless
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment