mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 18:53:28 +00:00
Added vehicle sensor handler to get sensor input and throw it on ATAK
This commit is contained in:
@@ -7,8 +7,13 @@ params["_unit"];
|
||||
private _affiliation = "f";
|
||||
private _type = "G";
|
||||
private _role = "a-f-G-U-C-I";
|
||||
|
||||
switch (str side _unit) do {
|
||||
private _side = side _unit;
|
||||
|
||||
if (isNil {_unit getVariable "armatak_current_side"}) then {
|
||||
_side = _unit getVariable "armatak_current_side";
|
||||
};
|
||||
|
||||
switch (str _side) do {
|
||||
case "WEST": {
|
||||
_affiliation = "f";
|
||||
};
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
params["_unit"];
|
||||
|
||||
_target = getSensorTargets (_unit);
|
||||
|
||||
{
|
||||
_unit = _x select 0;
|
||||
_position = _x select 1;
|
||||
_status = _x select 2;
|
||||
|
||||
if (isNil {_unit getVariable "armatak_current_side"}) then {
|
||||
_unit setVariable ["armatak_current_side", side _unit];
|
||||
};
|
||||
|
||||
if (_status != "destroyed") then {
|
||||
_unit call armatak_fnc_send_enemy_cot;
|
||||
};
|
||||
} forEach _target;
|
||||
@@ -16,6 +16,10 @@ if (roleDescription _unit != "") then {
|
||||
};
|
||||
};
|
||||
|
||||
if (side _unit == east) then {
|
||||
_callsign = getText (configOf _unit >> "displayName");
|
||||
};
|
||||
|
||||
armatak_attribute_unit_callsign = _unit getVariable "armatak_attribute_unit_callsign";
|
||||
|
||||
if (!isNil "armatak_attribute_unit_callsign" or armatak_attribute_unit_callsign != '') then {
|
||||
|
||||
Reference in New Issue
Block a user