Skip to content

Commit caa09db

Browse files
committed
Merge pull request #36 from bolbies/DUWS_additions
Merging since I could test by rebasing the detached head. Had an idiot moment there. #13, #14, #24, and more fixes
2 parents 307f019 + 9c779ef commit caa09db

File tree

19 files changed

+487
-102
lines changed

19 files changed

+487
-102
lines changed

source/initHQ/BluHQinit.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ _handle = [_hq] execVM "sounds\radiochatter.sqf";
4545
//_drawicon = [] execVM "inithq\drawIcon.sqf"; // create the icon
4646

4747
//GUARDS
48-
_handle = [getpos hq_blu1] execVM "initHQ\guards.sqf";
48+
_handle = [(getpos hq_blu1), _hq] execVM "initHQ\guards.sqf";
4949

5050
//STATIC DEFENSES
51-
_handle = [getpos hq_blu1] execVM "initHQ\fortify.sqf";
51+
_handle = [(getpos hq_blu1), _hq] execVM "initHQ\fortify.sqf";
5252

5353
// IF THE OFFICER IS DEAD -- BEGIN OF "SPAWN"
5454
[_hq] spawn {

source/initHQ/fortify.sqf

Lines changed: 95 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,115 @@
11
_centerPos = _this select 0;
2+
_hq = _this select 1;
23

34
_groupGuard = createGroup WEST;
45

56
// AA on the roof
6-
_aapod = createVehicle ["B_static_AA_F", [0,0,0], [], 0, "NONE"];
7-
_aapod allowdamage false;
8-
_aapod setdamage 0;
9-
_aapod setpos [_centerpos select 0, _centerpos select 1,(_centerpos select 2)+3.109];
7+
_aaPod = createVehicle ["B_static_AA_F", [0,0,0], [], 0, "NONE"];
8+
_aaPod allowdamage false;
9+
_aaPod setdamage 0;
10+
_aaPod setpos [_centerPos select 0, _centerPos select 1,(_centerPos select 2)+3.109];
1011

11-
_HQguard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
12-
_HQguard1 moveinGunner _aapod;
12+
_hqGuard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
13+
_hqGuard1 moveinGunner _aaPod;
1314

1415
// GMG
15-
_gl1pod = createVehicle ["B_GMG_01_high_F", [0,0,0], [], 0, "NONE"];
16-
_gl1pod allowdamage false;
17-
_gl1pod setdamage 0;
18-
_gl1pod setpos [(_centerpos select 0)-7, (_centerpos select 1)+5.5];
16+
_gl1Pod = createVehicle ["B_GMG_01_high_F", [0,0,0], [], 0, "NONE"];
17+
_gl1Pod allowdamage false;
18+
_gl1Pod setdamage 0;
19+
_gl1Pod setpos [(_centerPos select 0)-7, (_centerPos select 1)+5.5];
1920

20-
_HQguard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
21-
_HQguard1 moveinGunner _gl1pod;
21+
_hqGuard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
22+
_hqGuard1 moveinGunner _gl1Pod;
2223

2324
// AT
24-
_atpod1 = createVehicle ["B_static_AT_F", [0,0,0], [], 0, "NONE"];
25-
_atpod1 setpos [(_centerpos select 0)-7, (_centerpos select 1)-8];
26-
_atpod1 allowdamage false;
27-
_atpod1 setdamage 0;
28-
_atpod1 setdir 215;
25+
_atPod1 = createVehicle ["B_static_AT_F", [0,0,0], [], 0, "NONE"];
26+
_atPod1 setpos [(_centerPos select 0)-7, (_centerPos select 1)-8];
27+
_atPod1 allowdamage false;
28+
_atPod1 setdamage 0;
29+
_atPod1 setdir 215;
2930

30-
_HQguard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
31-
_HQguard1 moveinGunner _atpod1;
31+
_hqGuard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
32+
_hqGuard1 moveinGunner _atPod1;
3233

3334
// HMG
34-
_atpod2 = createVehicle ["B_HMG_01_high_F", [0,0,0], [], 0, "NONE"];
35-
_atpod2 allowdamage false;
36-
_atpod2 setdamage 0;
37-
_atpod2 setpos [(_centerpos select 0)+8, (_centerpos select 1)-7];
35+
_atPod2 = createVehicle ["B_HMG_01_high_F", [0,0,0], [], 0, "NONE"];
36+
_atPod2 allowdamage false;
37+
_atPod2 setdamage 0;
38+
_atPod2 setpos [(_centerPos select 0)+8, (_centerPos select 1)-7];
3839

39-
_HQguard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
40-
_HQguard1 moveinGunner _atpod2;
40+
_hqGuard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
41+
_hqGuard1 moveinGunner _atPod2;
4142

4243
// GMG
43-
_atpod3 = createVehicle ["B_GMG_01_high_F", [0,0,0], [], 0, "NONE"];
44-
_atpod3 allowdamage false;
45-
_atpod3 setdamage 0;
46-
_atpod3 setpos [(_centerpos select 0)+7, (_centerpos select 1)+8];
44+
_atPod3 = createVehicle ["B_GMG_01_high_F", [0,0,0], [], 0, "NONE"];
45+
_atPod3 allowdamage false;
46+
_atPod3 setdamage 0;
47+
_atPod3 setpos [(_centerPos select 0)+7, (_centerPos select 1)+8];
4748

48-
_HQguard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
49-
_HQguard1 moveinGunner _atpod3;
49+
_hqGuard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
50+
_hqGuard1 moveinGunner _atPod3;
51+
52+
// LIGHTS
53+
_light1 = createVehicle ["Land_Camping_Light_F", [0,0,0], [], 0, "NONE"];
54+
_light1 allowdamage false;
55+
_light1 setdamage 0;
56+
_light1 setpos [_centerPos select 0, _centerPos select 1];
57+
58+
_light2 = createVehicle ["Land_Camping_Light_F", [0,0,0], [], 0, "NONE"];
59+
_light2 allowdamage false;
60+
_light2 setdamage 0;
61+
_light2 setpos [(_centerPos select 0)+5.5, (_centerPos select 1)-5.5];
62+
63+
_light3 = createVehicle ["Land_Camping_Light_F", [0,0,0], [], 0, "NONE"];
64+
_light3 allowdamage false;
65+
_light3 setdamage 0;
66+
_light3 setpos [(_centerPos select 0)-5.5, (_centerPos select 1)+3.5];
67+
68+
_light4 = createVehicle ["Land_Camping_Light_F", [0,0,0], [], 0, "NONE"];
69+
_light4 allowdamage false;
70+
_light4 setdamage 0;
71+
_light4 setpos [(_centerPos select 0)+5.5, (_centerPos select 1)+3.5];
72+
73+
_light5 = createVehicle ["Land_Camping_Light_F", [0,0,0], [], 0, "NONE"];
74+
_light5 allowdamage false;
75+
_light5 setdamage 0;
76+
_light5 setpos [(_centerPos select 0)-5.5, (_centerPos select 1)-5.5];
77+
78+
_light6 = createVehicle ["Land_Camping_Light_F", [0,0,0], [], 0, "NONE"];
79+
_light6 allowdamage false;
80+
_light6 setdamage 0;
81+
_light6 setpos [(_centerPos select 0)+2.75, (_centerPos select 1)-2.75];
82+
83+
_light7 = createVehicle ["Land_Camping_Light_F", [0,0,0], [], 0, "NONE"];
84+
_light7 allowdamage false;
85+
_light7 setdamage 0;
86+
_light7 setpos [(_centerPos select 0)-2.75, (_centerPos select 1)+1.75];
87+
88+
_light8 = createVehicle ["Land_Camping_Light_F", [0,0,0], [], 0, "NONE"];
89+
_light8 allowdamage false;
90+
_light8 setdamage 0;
91+
_light8 setpos [(_centerPos select 0)+2.75, (_centerPos select 1)+1.75];
92+
93+
_light9 = createVehicle ["Land_Camping_Light_F", [0,0,0], [], 0, "NONE"];
94+
_light9 allowdamage false;
95+
_light9 setdamage 0;
96+
_light9 setpos [(_centerPos select 0)-2.75, (_centerPos select 1)-2.75];
5097

5198
sleep 2;
52-
_atpod1 allowdamage true;
53-
_atpod2 allowdamage true;
54-
_atpod3 allowdamage true;
55-
_gl1pod allowdamage true;
56-
_aapod allowdamage true;
99+
_atPod1 allowdamage true;
100+
_atPod2 allowdamage true;
101+
_atPod3 allowdamage true;
102+
_gl1Pod allowdamage true;
103+
_aaPod allowdamage true;
104+
_light1 allowdamage true;
105+
_light2 allowdamage true;
106+
_light3 allowdamage true;
107+
_light4 allowdamage true;
108+
_light5 allowdamage true;
109+
_light6 allowdamage true;
110+
_light7 allowdamage true;
111+
_light8 allowdamage true;
112+
_light9 allowdamage true;
113+
114+
115+
_hq addAction ["<t color='#ff0066'>Replace Defences (20CP)</t>", "initHQ\refortify.sqf", [_aaPod, _gl1Pod, _atPod1, _atPod2, _atPod3, _centerPos, _hq], 0, true, true, "", "_this == player"];

source/initHQ/fortifyFOB.sqf

Lines changed: 76 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,103 @@
1-
_centerPos = _this select 3;
1+
_centerPos = (_this select 3) select 0;
22
_actionID = _this select 2;
33
_object = _this select 0;
4+
_fob = (_this select 3) select 1;
5+
aliveAllUnits = {alive _x} count allunits;
46

57
if (commandpointsblu1 < 4) exitWith {hint "You don't have enough Command Points"};
68
commandpointsblu1 = commandpointsblu1 - 4;
79
publicvariable "commandpointsblu1";
8-
_object removeAction _actionID;
910

11+
12+
if ((Warcom_Limiter_Param == 1) && (aliveAllUnits>99)) exitWith {hint "*DUWS AI Limiter is ENABLED!*\n\nTry Fortifying again when there are less than 100 AI units on the map"};
13+
14+
_object removeAction _actionID;
1015
playSound "loadgun";
1116

1217
_groupGuard = createGroup WEST;
1318

1419
// AA on the roof
15-
_aapod = createVehicle ["B_static_AA_F", [0,0,0], [], 0, "NONE"];
16-
_aapod allowdamage false;
17-
_aapod setdamage 0;
18-
_aapod setpos [_centerpos select 0, _centerpos select 1,(_centerpos select 2)+3.109];
20+
_aaPod = createVehicle ["B_static_AA_F", [0,0,0], [], 0, "NONE"];
21+
_aaPod allowdamage false;
22+
_aaPod setdamage 0;
23+
_aaPod setpos [_centerPos select 0, _centerPos select 1,(_centerPos select 2)+3.109];
1924

20-
_HQguard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
21-
_HQguard1 moveinGunner _aapod;
25+
_fobGuard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
26+
_fobGuard1 moveinGunner _aaPod;
2227

2328
// GMG
24-
_gl1pod = createVehicle ["B_GMG_01_high_F", [0,0,0], [], 0, "NONE"];
25-
_gl1pod allowdamage false;
26-
_gl1pod setdamage 0;
27-
_gl1pod setpos [(_centerpos select 0)-7, (_centerpos select 1)+5.5];
29+
_gl1Pod = createVehicle ["B_GMG_01_high_F", [0,0,0], [], 0, "NONE"];
30+
_gl1Pod allowdamage false;
31+
_gl1Pod setdamage 0;
32+
_gl1Pod setpos [(_centerPos select 0)-7, (_centerPos select 1)+5.5];
2833

29-
_HQguard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
30-
_HQguard1 moveinGunner _gl1pod;
34+
_fobGuard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
35+
_fobGuard1 moveinGunner _gl1Pod;
3136

3237
// AT
33-
_atpod1 = createVehicle ["B_static_AT_F", [0,0,0], [], 0, "NONE"];
34-
_atpod1 setpos [(_centerpos select 0)-7, (_centerpos select 1)-8];
35-
_atpod1 allowdamage false;
36-
_atpod1 setdamage 0;
37-
_atpod1 setdir 215;
38+
_atPod1 = createVehicle ["B_static_AT_F", [0,0,0], [], 0, "NONE"];
39+
_atPod1 setpos [(_centerPos select 0)-7, (_centerPos select 1)-8];
40+
_atPod1 allowdamage false;
41+
_atPod1 setdamage 0;
42+
_atPod1 setdir 215;
3843

39-
_HQguard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
40-
_HQguard1 moveinGunner _atpod1;
44+
_fobGuard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
45+
_fobGuard1 moveinGunner _atPod1;
4146

4247
// HMG
43-
_atpod2 = createVehicle ["B_HMG_01_high_F", [0,0,0], [], 0, "NONE"];
44-
_atpod2 allowdamage false;
45-
_atpod2 setdamage 0;
46-
_atpod2 setpos [(_centerpos select 0)+8, (_centerpos select 1)-7];
48+
_atPod2 = createVehicle ["B_HMG_01_high_F", [0,0,0], [], 0, "NONE"];
49+
_atPod2 allowdamage false;
50+
_atPod2 setdamage 0;
51+
_atPod2 setpos [(_centerPos select 0)+8, (_centerPos select 1)-7];
4752

48-
_HQguard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
49-
_HQguard1 moveinGunner _atpod2;
53+
_fobGuard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
54+
_fobGuard1 moveinGunner _atPod2;
5055

5156
// GMG
52-
_atpod3 = createVehicle ["B_GMG_01_high_F", [0,0,0], [], 0, "NONE"];
53-
_atpod3 allowdamage false;
54-
_atpod3 setdamage 0;
55-
_atpod3 setpos [(_centerpos select 0)+7, (_centerpos select 1)+8];
57+
_atPod3 = createVehicle ["B_GMG_01_high_F", [0,0,0], [], 0, "NONE"];
58+
_atPod3 allowdamage false;
59+
_atPod3 setdamage 0;
60+
_atPod3 setpos [(_centerPos select 0)+7, (_centerPos select 1)+8];
61+
62+
_fobGuard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
63+
_fobGuard1 moveinGunner _atPod3;
5664

57-
_HQguard1 = _groupGuard createUnit ["B_Soldier_F", _centerPos, [], 0, "FORM"];
58-
_HQguard1 moveinGunner _atpod3;
65+
// LIGHTS
66+
_light1 = createVehicle ["Land_Camping_Light_F", [0,0,0], [], 0, "NONE"];
67+
_light1 allowdamage false;
68+
_light1 setdamage 0;
69+
_light1 setpos [_centerPos select 0, _centerPos select 1];
70+
71+
_light2 = createVehicle ["Land_Camping_Light_F", [0,0,0], [], 0, "NONE"];
72+
_light2 allowdamage false;
73+
_light2 setdamage 0;
74+
_light2 setpos [(_centerPos select 0)+5.5, (_centerPos select 1)-5.5];
75+
76+
_light3 = createVehicle ["Land_Camping_Light_F", [0,0,0], [], 0, "NONE"];
77+
_light3 allowdamage false;
78+
_light3 setdamage 0;
79+
_light3 setpos [(_centerPos select 0)-5.5, (_centerPos select 1)+3.5];
80+
81+
_light4 = createVehicle ["Land_Camping_Light_F", [0,0,0], [], 0, "NONE"];
82+
_light4 allowdamage false;
83+
_light4 setdamage 0;
84+
_light4 setpos [(_centerPos select 0)+5.5, (_centerPos select 1)+3.5];
85+
86+
_light5 = createVehicle ["Land_Camping_Light_F", [0,0,0], [], 0, "NONE"];
87+
_light5 allowdamage false;
88+
_light5 setdamage 0;
89+
_light5 setpos [(_centerPos select 0)-5.5, (_centerPos select 1)-5.5];
5990

6091
sleep 2;
61-
_atpod1 allowdamage true;
62-
_atpod2 allowdamage true;
63-
_atpod3 allowdamage true;
64-
_gl1pod allowdamage true;
65-
_aapod allowdamage true;
92+
_atPod1 allowdamage true;
93+
_atPod2 allowdamage true;
94+
_atPod3 allowdamage true;
95+
_gl1Pod allowdamage true;
96+
_aaPod allowdamage true;
97+
_light1 allowdamage true;
98+
_light2 allowdamage true;
99+
_light3 allowdamage true;
100+
_light4 allowdamage true;
101+
_light5 allowdamage true;
102+
103+
_fob addAction ["<t color='#ff0066'>Replace FOB Defences (15CP)</t>", "initHQ\refortifyFOB.sqf", [_aaPod, _gl1Pod, _atPod1, _atPod2, _atPod3, _centerPos, _fob], 0, true, true, "", "_this == player"];

0 commit comments

Comments
 (0)