It's not possible to create shape markers in Editor with script command.
Description
Details
- Severity
- Minor
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- Eden Editor
- Eden editor
- Debug Console
- Execute code:
_m = create3DENEntity ["Marker", "rectangle", [3350,4500,0]]; _m set3DENAttribute ["markerType", "RECTANGLE"];
Of course, I can create simple marker via something like
_m = create3DENEntity ["Marker", "mil_dot", [3350,4500,0]];
But all tries to change to shape gives no result:
_m set3DENAttribute ["markerType", "RECTANGLE"];
Event Timeline
Of course, I can create simple marker via something like
_m = create3DENEntity ["Marker", "rectangle", [3350,4500,0]];
This is not a valid marker as there is no class "rectangle" in CfgMarkers, you should get error
_m = create3DENEntity ["Marker", "mil_dot", [100, 100, 0]]; _m set3DENAttribute ["markerType", 1]; //Unsure if number or string (like setMarkerShape). Attribute returns -1 as default value and 1 or 2 for rectangle/ellipse _m set3DENAttribute ["brush", "DiagGrid"]; [_m get3DENAttribute "itemClass", _m get3DENAttribute "markerType", _m get3DENAttribute "brush"]
Seems like markerType and brush have no effect. @BIS_fnc_KK
@BIS_fnc_KK, I fixed misprint in the ticket additional info. And @R3vo has alredy described this correctly above.
In summary, any try to change icon marker to shape marker via changing "markerType" fails.
And you are right, it's not possible to create shape marker as there are no class "rectangle"/"ellipse" in CfgMarkers.
Note, for the markers created with GUI values "RECTANGLE" or "ELLIPSE" are being set for "markerType" parameter in "mission.sqm"!
So how to create a shape marker with a script only in Eden?
Well, for default makers one can simple create them without defining icon or shape and then decided if it's an icon or shape marker. With create3DENEntity this isn't possible so one has to set a marker to icon first.
Fixed in revision: 147769
So how to create a shape marker with a script only in Eden?
m = create3DENEntity ["Marker", "", position player]; // default rectangle marker m set3DENAttribute ["markerType", 1]; //0 - rectangle; 1- ellipse m set3DENAttribute ["brush", "DiagGrid"];