-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sqf
159 lines (114 loc) · 4.83 KB
/
init.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
/*
* Filename:
* init.sqf
*
* Description:
* Executed when mission is started (before briefing screen)
*
* Created by Jman
* Creation date: 24/07/2023
*
// ====================================================================================
*/
// Initialize SPE Function to draw frontline on map
[
call compile preprocessFileLineNumbers "scripts\frontline_data.sqf"
] call SPE_MISSIONUTILITYFUNCTIONS_fnc_generateFrontline;
if (hasInterface) then {
(group player) addEventHandler ["UnitJoined",
{
params ["_group", "_newUnit"];
[_newUnit] call SPE_MissionUtilityFunctions_fnc_ReviveToksaInit;
[_newUnit] call SPE_MissionUtilityFunctions_fnc_ReviveToksaActionsInit;
}]};
//Starting Init
["| Operation Cobra - Executing init.sqf..."] call ALiVE_fnc_dump;
// ====================================================================================
// Disable AI simuation in single player & editor preview
if (!isMultiplayer) then {
skipTime 9;
{if (_x != player) then {_x enableSimulation false}} forEach switchableUnits;
};
// ====================================================================================
//Set default view distance for players
if (viewDistance > 650) then {
setViewDistance 650;
};
if ((getObjectViewDistance # 0) > 650) then {
setObjectViewDistance 650;
};
setTerrainGrid 3.125;
waitUntil { !(isNull player) };
//Restrict Arsenal to US equipement only
if (side player == RESISTANCE) then {
BIS_fnc_arsenal_factions = [faction player,"SPE_US_ARMY"];
};
//Initialize various scripts
[] execVM "bon_recruit_units\init.sqf";
[] execVM "Scripts\Earplugs.sqf";
[] execVM "Scripts\SquadResetInit.sqf";
//Fixes for IFS
[] spawn
{
// Wait for other initializations
sleep 15;
// Fix for clients not initializing scripts
if (!isServer) then {[] call SPE_MissionUtilityFunctions_fnc_IFS_Init};
// Fix for null variable on clients
if (isServer) then {publicVariable "SPE_IFS_availableCalls"};
// Fix for AI not utilizing supports
if (isServer) then
{
if (isNil "SPE_IFS_AmountMultiplier") then
{
SPE_IFS_AmountMultiplier = [[0.33,0.5,1],[0.33,0.5,1]];
};
publicVariable "SPE_IFS_AmountMultiplier";
};
// Fix for player respawn
if (hasInterface) then
{
player addEventHandler ["Respawn",{_this spawn SPE_MissionUtilityFunctions_fnc_IFS_onPlayerRespawn}];
};
};
/////////////////////////// T H I S H A S T O G O L A S T ////////////////////////////////////////////////
if (hasInterface) then {
["| Operation Cobra - Running ClientInit..."] call ALiVE_fnc_dump;
[] spawn {
_start = time;
waituntil {(player getvariable ["alive_sys_player_playerloaded",false]) || ((time - _start) > 10)};
sleep 3;
playMusic "SPE_HoW_Misc_Daniel_Patras_Theme";
10 fadesound 0.9;
sleep 60;
_title = "<t size='1.5' color='#68a7b7' shadow='1'>OPERATION COBRA</t><br/>";
_text = format["%1<t>Weapons, ammo and supplies are available in the crates, load up and head out.</t>",_title];
["openSideSmall",0.4] call ALIVE_fnc_displayMenu;
["setSideSmallText",_text] call ALIVE_fnc_displayMenu;
sleep 15;
_title = "<t size='1.5' color='#68a7b7' shadow='1'>OPERATION COBRA</t><br/>";
_text = format["%1<t>Use the mobile respawn Halftrack which can be deployed on the frontline.</t>",_title];
["openSideSmall",0.4] call ALIVE_fnc_displayMenu;
["setSideSmallText",_text] call ALIVE_fnc_displayMenu;
sleep 15;
_title = "<t size='1.5' color='#68a7b7' shadow='1'>OPERATION COBRA</t><br/>";
_text = format["%1<t>Deploy to the mobile respawn Halftrack using the flagpole at base.</t>",_title];
["openSideSmall",0.4] call ALIVE_fnc_displayMenu;
["setSideSmallText",_text] call ALIVE_fnc_displayMenu;
sleep 15;
_title = "<t size='1.5' color='#68a7b7' shadow='1'>OPERATION COBRA</t><br/>";
_text = format["%1<t>Grab a Radiopack in order to call in air support, artillery or resupplies.</t>",_title];
["openSideSmall",0.4] call ALIVE_fnc_displayMenu;
["setSideSmallText",_text] call ALIVE_fnc_displayMenu;
sleep 15;
_title = "<t size='1.5' color='#68a7b7' shadow='1'>OPERATION COBRA</t><br/>";
_text = format["%1<t>You can use ALiVE Logistics to move supplies by vehicle to other locations.</t>",_title];
["openSideSmall",0.4] call ALIVE_fnc_displayMenu;
["setSideSmallText",_text] call ALIVE_fnc_displayMenu;
sleep 15;
_title = "<t size='1.5' color='#68a7b7' shadow='1'>OPERATION COBRA</t><br/>";
_text = format["%1<t>You can use skip time by using the flagpole.</t>",_title];
["openSideSmall",0.4] call ALIVE_fnc_displayMenu;
["setSideSmallText",_text] call ALIVE_fnc_displayMenu;
};
};