Page MenuHomeFeedback Tracker

createMarker(local) command ignores drawPriority of other markers
Feedback, NormalPublic

Description

Markers are always added at the end of allMapMarkers and then always drawn on top even though other markers have a higher priority.

Details

Severity
Tweak
Resolution
Open
Reproducibility
Always
Operating System
Windows 11 x64
Category
Scripting
Steps To Reproduce
allMapMarkers apply {deleteMarker _x};

for "_i" from 1 to 5 do
{
  _marker = createMarker ["m_" + str _i, player];
  _marker setMarkerType "hd_dot"; 
  _marker setMarkerDrawPriority (10 - _i);
};

//Correctly sorted e.g m_5, m_4... instead of m_1, m_2...
systemChat format ["Correct Order: %1", allMapMarkers];

_marker = createMarker ["m_final", player];
_marker setMarkerType "hd_dot"; 

//incorrectly sorted
systemChat format ["Incorrect Order: %1", allMapMarkers];

//Sort allMapMarkers by priority
"m_1" setMarkerDrawPriority (markerDrawPriority "m_1");

//Correctly sorted
systemChat format ["Correct Order: %1", allMapMarkers];

Event Timeline

R3vo created this task.Apr 19 2024, 3:47 PM
R3vo edited Steps To Reproduce. (Show Details)Apr 19 2024, 3:52 PM
dedmen changed the task status from New to Feedback.Apr 24 2024, 10:12 AM