summaryrefslogtreecommitdiffstats
path: root/Common/Common_AARadarMarkerUpdate.sqf
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-06-11 19:58:31 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-06-11 19:58:31 +0300
commite670b4ed55c459a21090bd0178ceaaaf12d87989 (patch)
treeb6833d5e842475f0ee27f5f617096445fdd4e4a1 /Common/Common_AARadarMarkerUpdate.sqf
downloada2wf_fallujah-e670b4ed55c459a21090bd0178ceaaaf12d87989.tar.gz
a2wf_fallujah-e670b4ed55c459a21090bd0178ceaaaf12d87989.tar.bz2
a2wf_fallujah-e670b4ed55c459a21090bd0178ceaaaf12d87989.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