Skip to content

Commit a2277d1

Browse files
authored
Added voice chat
1 parent e64b6a7 commit a2277d1

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

addons/AIO_AIMENU/Functions/Assemble.sqf

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,25 @@ AIO_staticAssemble_Fnc = {
44
_units = _this select 0;
55
_pos = _this select 1;
66
_dir = getDir player;
7-
if (_dir <= 22.5 OR _dir >= 337.5) then {_dirChat = "North."};
8-
if (_dir > 22.5 AND _dir <= 67.5) then {_dirChat = "North-East."};
9-
if (_dir > 292.5 AND _dir < 337.5) then {_dirChat = "North-West."};
10-
if (_dir > 67.5 AND _dir <= 112.5) then {_dirChat = "East."};
11-
if (_dir > 112.5 AND _dir <= 157.5) then {_dirChat = "South-East."};
12-
if (_dir > 157.5 AND _dir <= 202.5) then {_dirChat = "South."};
13-
if (_dir > 202.5 AND _dir <= 247.5) then {_dirChat = "South-West."};
14-
if (_dir > 247.5 AND _dir <= 292.5) then {_dirChat = "West."};
7+
if (_dir <= 22.5 OR _dir >= 337.5) then {_dirChat = "North"};
8+
if (_dir > 22.5 AND _dir <= 67.5) then {_dirChat = "NorthEast"};
9+
if (_dir > 292.5 AND _dir < 337.5) then {_dirChat = "NorthWest"};
10+
if (_dir > 67.5 AND _dir <= 112.5) then {_dirChat = "East"};
11+
if (_dir > 112.5 AND _dir <= 157.5) then {_dirChat = "SouthEast"};
12+
if (_dir > 157.5 AND _dir <= 202.5) then {_dirChat = "South"};
13+
if (_dir > 202.5 AND _dir <= 247.5) then {_dirChat = "SouthWest"};
14+
if (_dir > 247.5 AND _dir <= 292.5) then {_dirChat = "West"};
1515
_chat = format ["Assemble that weapon towards %1", _dirChat];
16+
if (AIO_useVoiceChat) then {
17+
_dirChat spawn {
18+
private _dummy = "#particlesource" createVehicleLocal ASLToAGL getPosWorld player;
19+
_dummy say2D "AIO_say_Assemble";
20+
sleep 1.2;
21+
_dummy say2D (format ["AIO_say_due_%1", _this]);
22+
sleep 1.5;
23+
deleteVehicle _dummy;
24+
};
25+
};
1626
player groupChat _chat;
1727
if (count _units == 2) then {
1828
_unit1 = _units select 0;

0 commit comments

Comments
 (0)