summaryrefslogtreecommitdiffstats
path: root/Common/Common_AARadarMarkerUpdate.sqf
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-06-11 19:54:45 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-06-11 19:54:45 +0300
commit68d4c9bbd80ed2e6528244569c79676b87295bd1 (patch)
tree6efd42fbf6f1281874ae0ff1f8816b01fe0c7153 /Common/Common_AARadarMarkerUpdate.sqf
downloada2wf_takistan-68d4c9bbd80ed2e6528244569c79676b87295bd1.tar.gz
a2wf_takistan-68d4c9bbd80ed2e6528244569c79676b87295bd1.tar.bz2
a2wf_takistan-68d4c9bbd80ed2e6528244569c79676b87295bd1.zip
init
Diffstat (limited to 'Common/Common_AARadarMarkerUpdate.sqf')
-rw-r--r--Common/Common_AARadarMarkerUpdate.sqf35
1 files changed, 35 insertions, 0 deletions
diff --git a/Common/Common_AARadarMarkerUpdate.sqf b/Common/Common_AARadarMarkerUpdate.sqf
new file mode 100644
index 0000000..598932b
--- /dev/null
+++ b/Common/Common_AARadarMarkerUpdate.sqf
@@ -0,0 +1,35 @@
+Private ["_height","_object","_markerName","_side","_zOffset"];
+
+waitUntil {commonInitComplete};
+sleep 2;
+
+_object = _this select 0;
+_side = _this select 1;
+
+if (_side == side player || isNull _object ||!(alive _object)) exitWith {};
+
+unitMarker = unitMarker + 1;
+_markerName = Format ["unitMarker%1",unitMarker];
+
+createMarkerLocal [_markerName,[0,0,0]];
+_markerName setMarkerTypeLocal "Vehicle";
+_markerName setMarkerColorLocal "ColorRed";
+_markerName setMarkerSizeLocal [5,5];
+_markerName setMarkerAlphaLocal 0;
+_height = 'WFBE_ANTIAIRRADARDETECTION' Call GetNamespace;
+
+while {alive _object && !(isNull _object)} do {
+ if (antiAirRadarInRange) then {
+ _zOffset = (getPos _object) select 2;
+ if (_zOffset > _height) then {
+ _markerName setMarkerAlphaLocal 1;
+ _markerName setMarkerPosLocal (getPos _object);
+ } else {
+ _markerName setMarkerAlphaLocal 0;
+ };
+ };
+
+ sleep 1;
+};
+
+deleteMarkerLocal _markerName; \ No newline at end of file