summaryrefslogtreecommitdiffstats
path: root/Client/Functions/Client_MarkerAnim.sqf
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-06-11 19:55:24 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-06-11 19:55:24 +0300
commit628d33984d9228f1781d13a65fbb80f35facc899 (patch)
treecd909141f87e14f22c3511549a9bc067d9ff8b50 /Client/Functions/Client_MarkerAnim.sqf
downloada2wf_sara-628d33984d9228f1781d13a65fbb80f35facc899.tar.gz
a2wf_sara-628d33984d9228f1781d13a65fbb80f35facc899.tar.bz2
a2wf_sara-628d33984d9228f1781d13a65fbb80f35facc899.zip
init
Diffstat (limited to 'Client/Functions/Client_MarkerAnim.sqf')
-rw-r--r--Client/Functions/Client_MarkerAnim.sqf45
1 files changed, 45 insertions, 0 deletions
diff --git a/Client/Functions/Client_MarkerAnim.sqf b/Client/Functions/Client_MarkerAnim.sqf
new file mode 100644
index 0000000..beb85b2
--- /dev/null
+++ b/Client/Functions/Client_MarkerAnim.sqf
@@ -0,0 +1,45 @@
+Private ["_additionalErase","_direction","_expand","_markerColor","_markerMax","_markerMin","_markerName","_markerPosition","_markerSize","_markerType"];
+_markerName = _this select 0;
+_markerPosition = _this select 1;
+_markerType = _this select 2;
+_markerSize = _this select 3;
+_markerColor = _this select 4;
+_markerMin = _this select 5;
+_markerMax = _this select 6;
+_additionalErase = "";
+if (count _this > 7) then {_additionalErase = _this select 7};
+
+deleteMarkerLocal _markerName;
+CreateMarkerLocal [_markerName,_markerPosition];
+_markerName setMarkerTypeLocal _markerType;
+_markerName setMarkerColorLocal _markerColor;
+_markerName setMarkerSizeLocal [_markerSize,_markerSize];
+
+_difference = (_markerMax - _markerMin)/10;
+_direction = 0;
+_expand = true;
+activeAnimMarker = true;
+
+if (_additionalErase != "") then {
+ Private ["_pr"];
+ _pr = 'WFBE_PATROLRANGE' Call GetNamespace;
+ createMarkerLocal [_additionalErase,_markerPosition];
+ _additionalErase setMarkerShapeLocal "Ellipse";
+ _additionalErase setMarkerColorLocal _markerColor;
+ _additionalErase setMarkerSizeLocal [_pr,_pr];
+};
+
+while {activeAnimMarker} do {
+ sleep 0.03;
+
+ _direction = (_direction + 1) % 360;
+ _markerName setMarkerDirLocal _direction;
+ _markerName setMarkerSizeLocal [_markerSize,_markerSize];
+
+ if (_markerSize > _markerMax) then {_expand = false};
+ if (_markerSize < _markerMin) then {_expand = true};
+ if (_expand) then {_markerSize = _markerSize + _difference} else {_markerSize = _markerSize - _difference};
+};
+
+deleteMarkerLocal _markerName;
+if (_additionalErase != "") then {deleteMarkerLocal _additionalErase}; \ No newline at end of file