diff options
| author | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:55:41 +0300 |
|---|---|---|
| committer | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:55:41 +0300 |
| commit | dee52083d359434fc3ac51a871c1b836d092d2ac (patch) | |
| tree | 89bbb6326348a99bcf4a68761bd0c9628b80d4bb /Client/PVFunctions/UAV_Reveal.sqf | |
| download | a2wf_lingor-dee52083d359434fc3ac51a871c1b836d092d2ac.tar.gz a2wf_lingor-dee52083d359434fc3ac51a871c1b836d092d2ac.tar.bz2 a2wf_lingor-dee52083d359434fc3ac51a871c1b836d092d2ac.zip | |
init
Diffstat (limited to 'Client/PVFunctions/UAV_Reveal.sqf')
| -rw-r--r-- | Client/PVFunctions/UAV_Reveal.sqf | 27 |
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 |
