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_MarkerUpdate.sqf | |
| download | a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.tar.gz a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.tar.bz2 a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.zip | |
init
Diffstat (limited to 'Common/Common_MarkerUpdate.sqf')
| -rw-r--r-- | Common/Common_MarkerUpdate.sqf | 41 |
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 |
