-
Notifications
You must be signed in to change notification settings - Fork 0
/
initServer.sqf
44 lines (36 loc) · 1.34 KB
/
initServer.sqf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include "config\classnames.hpp";
#include "config\factions.hpp";
#include "config\groups.hpp";
#include "config\missions.hpp";
#include "server\_compile.sqf";
#include "shared\_compile.sqf";
phobosId = 0;
bomberCount = 0;
publicVariable "phobosId";
[] call Phobos_initHouses;
[] call Phobos_initEnemy;
[] call Phobos_initCivilian;
[] call Phobos_initMissions;
[] call Phobos_initZones;
unitArray = [unitArray] call CBA_fnc_shuffle;
vehicleArray = [vehicleArray] call CBA_fnc_shuffle;
["Initialize", [false, 5, true]] call Phobos_squadmanagerDynamicGroups;
[Phobos_cacheAiMain, 5] call CBA_fnc_addPerFrameHandler;
[Phobos_coreMissions, 1] call CBA_fnc_addPerFrameHandler;
[Phobos_corePopulation, 60] call CBA_fnc_addPerFrameHandler;
[Phobos_coreZones, 30] call CBA_fnc_addPerFrameHandler;
//Temp
[{
{
[_x, _x, 100, 3, 0.5, 0.5] call CBA_fnc_taskDefend;
{
_x setVariable ["phobos_ai_hastask", true, true];
} forEach (units _x);
} forEach (allGroups select {side _x == east && !((leader _x) getVariable ["phobos_ai_hastask", false])});
{
[_x, _x, 50, 5, "MOVE", "SAFE", "YELLOW", "LIMITED"] call CBA_fnc_taskPatrol;
{
_x setVariable ["phobos_ai_hastask", true, true];
} forEach (units _x);
} forEach (allGroups select {side _x == civilian && !((leader _x) getVariable ["phobos_ai_hastask", false])});
}, 10] call CBA_fnc_addPerFrameHandler;