Page MenuHomeFeedback Tracker

A marker direction taken from MarkerCreated EH is always zero
Closed, ResolvedPublic

Description

I'm using my own markers aggregating system, and needed to register all created markers.
When gathering marker params in MarkerCreated EH marker direction is always 0.
I've added the sleep command before adding the marker to the data structure, but as I understand - that wasn't implied.

Tested on a client when playing on dedicated.

Details

Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Windows 7 x64
Category
General
Steps To Reproduce
OT_markers = [];

addMissionEventHandler ["MarkerCreated", {
    params ["_marker", "_channel", "_owner", "_local"];
    diag_log format ["Marker created on %1, marker owner %2, marker dir %3", clientowner,_owner, markerDir _marker];
    if (isNull _owner or _channel > 2) exitWith {};
    if (local _owner && {!isNil "OT_markers"}) exitWith {
        OT_markers pushbackUnique [
            _marker,
            markerPos _marker,
            markerType _marker,
            markerShape _marker,
            markerSize _marker,
            markerDir _marker,
            markerBrush _marker,
            markerColor _marker,
            markerAlpha _marker,
            markerText _marker,
            markerPolyline _marker,
            markerShadow _marker, 
            _channel,
            getPlayerUID _owner,
            false
        ];
    };
    deleteMarkerLocal _marker;
}];

In this case the marker dir will be 0.

Event Timeline

MaxP created this task.Aug 4 2024, 9:11 PM

is the marker created with dir 0?

MaxP added a comment.Aug 5 2024, 1:45 AM

No, of course no :)
I specifically tested with the marker rotated.

dedmen closed this task as Resolved.EditedAug 5 2024, 10:44 AM
dedmen claimed this task.
dedmen added a subscriber: dedmen.

Client1:

addMissionEventHandler ["MarkerCreated", { 
    params ["_marker", "_channel", "_owner", "_local"]; 
    systemChat str markerDir _marker;
}];

Client2:

_markerstr = createMarkerLocal ["markername",[_Xpos,_Ypos]];
_markerstr setMarkerShapeLocal "ICON";
_markerstr setMarkerTypeLocal "DOT";
_markerstr setMarkerDir 1337;

Client1:
-> 1337

Your "steps to reproduce" are not steps to reproduce this issue.
There is no marker being created in what you listed.

BIS_fnc_KK added a comment.EditedAug 5 2024, 1:21 PM

No, of course no :)
I specifically tested with the marker rotated.

How do you create marker with an angle? There is no param in createMarker and UI marker is created with dir 0. If you update marker and change angle you can use MarkerUpdated EH

MaxP added a comment.Aug 5 2024, 1:55 PM

How do you create marker with an angle?

With standard marker tools available on the map (sorry, I didn't notice it before)

With standard marker tools available on the map

I dont have such marker, are you playing modded game?

MaxP added a comment.Aug 6 2024, 12:13 AM

Ah, yeah, seems like those are ACE markers :)
I've gotten so used to it that I forgot it wasn't standard :) No more questions, sorry for bothering.