summaryrefslogtreecommitdiffstats
path: root/Client/PVFunctions/UAV_Reveal.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 /Client/PVFunctions/UAV_Reveal.sqf
downloada2wf_fallujah-e670b4ed55c459a21090bd0178ceaaaf12d87989.tar.gz
a2wf_fallujah-e670b4ed55c459a21090bd0178ceaaaf12d87989.tar.bz2
a2wf_fallujah-e670b4ed55c459a21090bd0178ceaaaf12d87989.zip
init
Diffstat (limited to 'Client/PVFunctions/UAV_Reveal.sqf')
-rw-r--r--Client/PVFunctions/UAV_Reveal.sqf27
1 files changed, 27 insertions, 0 deletions
diff --git a/Client/PVFunctions/UAV_Reveal.sqf b/Client/PVFunctions/UAV_Reveal.sqf
new file mode 100644
index 0000000..c2b1857
--- /dev/null
+++ b/Client/PVFunctions/UAV_Reveal.sqf
@@ -0,0 +1,27 @@
+/*
+ Author: Benny
+ Name: UAV_Reveal.sqf
+ Parameters:
+ 0 - UAV
+ 1 - Target
+ Description:
+ This file handle the client's UAV broadcast, a client send info to the others.
+*/
+
+Private ['_marker','_size','_target','_uav'];
+_uav = _this select 0;
+_target = _this select 1;
+
+if (typeName _uav != 'OBJECT' || typeName _target != 'OBJECT') exitWith {diag_log Format ["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] UAV_Reveal: An object is expected for both parameters given (UAV: %1 Target: %2).",_uav,_target,diag_frameno,diag_tickTime]};
+
+_size = round((_uav distance _target) / 16);
+_marker = Format["WFBE_UAV_SPOTTED_%1",unitMarker];
+unitMarker = unitMarker + 1;
+createMarkerLocal [_marker,[(getPos _target select 0) - random(_size) + random(_size),(getPos _target select 1) - random(_size) + random(_size),0]];
+_marker setMarkerShapeLocal "Ellipse";
+_marker setMarkerColorLocal "ColorOrange";
+_marker setMarkerSizeLocal [_size,_size];
+
+sleep (('WFBE_UAVSPOTTINGDELAY' Call GetNamespace)*3);
+
+deleteMarkerLocal _marker; \ No newline at end of file