summaryrefslogtreecommitdiffstats
path: root/Common/Common_MarkerUpdate.sqf
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-06-11 19:57:23 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-06-11 19:57:23 +0300
commit3533c3aa9393fc6350178b196c813dc636ec9cf6 (patch)
tree2f96a879c3935dea18e73410926b03c7eef1a751 /Common/Common_MarkerUpdate.sqf
downloada2wf_isladuala-3533c3aa9393fc6350178b196c813dc636ec9cf6.tar.gz
a2wf_isladuala-3533c3aa9393fc6350178b196c813dc636ec9cf6.tar.bz2
a2wf_isladuala-3533c3aa9393fc6350178b196c813dc636ec9cf6.zip
init
Diffstat (limited to 'Common/Common_MarkerUpdate.sqf')
-rw-r--r--Common/Common_MarkerUpdate.sqf41
1 files changed, 41 insertions, 0 deletions
diff --git a/Common/Common_MarkerUpdate.sqf b/Common/Common_MarkerUpdate.sqf
new file mode 100644
index 0000000..e9c372b
--- /dev/null
+++ b/Common/Common_MarkerUpdate.sqf
@@ -0,0 +1,41 @@
+private ["_deathMarkerColor","_deathMarkerSize","_deathMarkerType","_deletePrevious","_markerColor","_markerName","_markerSize","_markerType","_markerText","_refreshRate","_trackDeath","_tracked","_side"];
+
+waitUntil {commonInitComplete};
+
+_markerType = _this select 0;
+_markerColor = _this select 1;
+_markerSize = _this select 2;
+_markerText = _this select 3;
+_markerName = _this select 4;
+_tracked = _this select 5;
+_refreshRate = _this select 6;
+_trackDeath = _this select 7;
+_deathMarkerType = _this select 8;
+_deathMarkerColor = _this select 9;
+_deletePrevious = _this select 10;
+_side = _this select 11;
+_deathMarkerSize = [1,1];
+if (count _this > 12) then {_deathMarkerSize = _this select 12};
+
+if (_side != side player || isNull _tracked || !(alive _tracked)) exitWith {};
+if (_deletePrevious) then {deleteMarkerLocal _markerName};
+
+createMarkerLocal [_markerName,getPos _tracked];
+if (_markerText != "") then {_markerName setMarkerTextLocal _markerText};
+_markerName setMarkerTypeLocal _markerType;
+_markerName setMarkerColorLocal _markerColor;
+_markerName setMarkerSizeLocal _markerSize;
+
+while {alive _tracked && !(isNull _tracked)} do {
+ _markerName setMarkerPosLocal (getPos _tracked);
+ sleep _refreshRate;
+};
+
+if (_trackDeath) then {
+ _markerName setMarkerTypeLocal _deathMarkerType;
+ _markerName setMarkerColorLocal _deathMarkerColor;
+ _markerName setMarkerSizeLocal _deathMarkerSize;
+ sleep ('WFBE_MARKERDEADDELAY' Call GetNamespace);
+};
+
+deleteMarkerLocal _markerName; \ No newline at end of file