diff options
| author | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:55:04 +0300 |
|---|---|---|
| committer | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:55:04 +0300 |
| commit | b06990293397d4b6d0374097f09d1cc5679216e3 (patch) | |
| tree | 5719922562e317a8083250c178f24376b6692569 /Common/Common_AARadarMarkerUpdate.sqf | |
| download | a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.tar.gz a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.tar.bz2 a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.zip | |
init
Diffstat (limited to '')
| -rw-r--r-- | Common/Common_AARadarMarkerUpdate.sqf | 35 |
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 |
