-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcaptured.sqf
More file actions
70 lines (53 loc) · 2.36 KB
/
captured.sqf
File metadata and controls
70 lines (53 loc) · 2.36 KB
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
_place = _this select 0;
_points = _this select 1;
_markername = _this select 2;
_markername2 = _this select 3;
_triggerPos = _this select 4;
amount_zones_captured = amount_zones_captured + 1;
publicVariable "amount_zones_captured";
[["us_takencontrol",[_place]],"bis_fnc_showNotification"] call BIS_fnc_MP;
// TELL THE ZONE IS UNDER BLU CONTROL
WARCOM_zones_controled_by_BLUFOR = WARCOM_zones_controled_by_BLUFOR + [_triggerPos];
publicVariable "WARCOM_zones_controled_by_BLUFOR";
// TELL THE ZONE IS REMOVED FROM OPFOR CONTROL
WARCOM_zones_controled_by_OPFOR = WARCOM_zones_controled_by_OPFOR - [_triggerPos];
publicVariable "WARCOM_zones_controled_by_OPFOR";
// REMOVE A ZONE FROM OPFOR CONTROL //NOT SURE WHAT KIBOT'S DOING HERE?//
//_index = 0;
//{
//if ((_x select 0 == _triggerPos select 0) && (_x select 1 == _triggerPos select 1) && (_x select 2 == _triggerPos select 2)) exitWith {
//WARCOM_zones_controled_by_OPFOR set [_index,-1];
//WARCOM_zones_controled_by_OPFOR = WARCOM_zones_controled_by_OPFOR - [-1];
//};
//_index = _index + 1;
//} forEach WARCOM_zones_controled_by_OPFOR;
//////////////////////////////////////////////////////////////////////////
// ADD POINTS
if (isServer) then {
_points = round(_points/3);
commandpointsblu1 = commandpointsblu1 + _points;
publicVariable "commandpointsblu1";
};
// ADD NUMBER OF CONTROLLED ZONES
zoneundercontrolblu = zoneundercontrolblu + 1;
publicVariable "zoneundercontrolblu";
// MODIFY ARMY POWER
WARCOM_opfor_ap = WARCOM_opfor_ap - (_points/2);
WARCOM_blufor_ap = WARCOM_blufor_ap + _points;
publicVariable "WARCOM_blufor_ap";
publicVariable "WARCOM_opfor_ap";
// ADD PERSISTENT STAT
_addzone = [] execVM "persistent\persistent_stats_zones_add.sqf";
// MODIFY MARKER ICON
str(_markername) setMarkerColor "ColorGreen";
// hint str(_markername);
// MODIFY MARKER ELLIPSE
str(_markername2) setMarkerColor "ColorGreen";
sleep 2;
["cpadded",[_points]] call bis_fnc_showNotification;
private "_trg";
// RECALL VARNAME FOR ZONE TRIGGER --> use the pos of the trigger
call compile format["_trg = trigger%1%2",round (_triggerPos select 0),round (_triggerPos select 1)];
//// MAKE THE TRIGGER CAPTURABLE FOR OPFOR
_trg setTriggerActivation["EAST SEIZED","PRESENT",true];
_trg setTriggerStatements["this", format["[""%1"",%2,""%3"",""%4"",%5] execvm 'zonescap\opfor_cap.sqf'",_place,_points,_markername,_markername2,_triggerPos], ""];