Jump to content
pierremgi

cfgMarkers for ellipse/rectangle one?

Recommended Posts

Hi all,

I'm trying to script some plain ellipse markers in 3den

I have my own module for that.

If I use the  createMarker command, everything goes well but these markers vanished at preview. Normal. But when I come back to 3den, the markers are no more present. I don't want that.

 

So, I'm trying to use create3denEntity. that means to know what the cfgMarkers class is:

_mk = create3DENEntity ["markers", "class", position]

The problem is that all available cfgMarkers classes seem to be for iconed markers but not area ones.

I tried "system", "ellipse", "", "empty"...   Only empty is a defined class, so it's works... for an empty marker.

Then I added lines like:

    _mk set3DENAttribute ["itemClass","ellipse"];
    _mk set3DENAttribute ["markerType",1];
    _mk set3DENAttribute ["brush","solid"];

Nothing works. The marker remains "empty".

 

Any idea to add a solid area marker by create3denEntity ?

Thanks

Share this post


Link to post
Share on other sites

To go further:

In mission.sqm, placing 2 different markers, one "select" iconed and on "ellipse" area, the items are:

 

class Item8
        {
            dataType="Marker";
            position[]={6952.6099,0,7400.3501};
            name="MGI_LOC_xx6953yy7400";
            type="Select";
            id=8;
            atlOffset=-2.6600001;
        };
        class Item9
        {
            dataType="Marker";
            position[]={6689.7407,9.9277344,8665.3623};
            name="marker_7";
            markerType="ELLIPSE";
            type="ellipse";
            a=500;
            b=500;
            id=9;
            atlOffset=-40.554852;
        };

 

So, why is it impossible to add an area marker with create3denEntity???

At BI devs: this could be a feature request?

Share this post


Link to post
Share on other sites

Pierre, I posted a similar post a short while ago.
Your post did not show up when I was frantically searching.

 

I have posted a workaround I have been using in there, however it is far from ideal.

 

Hopefully someone has a solution...
Being ArmA, it will be something stupidly obvious and we will both be sick.
 


 

Share this post


Link to post
Share on other sites

No problem. There is no way to do that with the 3den commands. Just because the area markers have no class and the class name is mandatory in create3denEntity.

Of course, for my mod (modules), I don't want to let the user dig in his mission.sqm and modify it manually. So, I just createMarker in 3den, and recreate them at init, if needed (most of them are just help for modules usage).

Share this post


Link to post
Share on other sites

How about adding a composition in your addon (CfgGroups) that is just an area marker, and spawning the composition (create3denComposition) when you need an area marker.

Once the area marker is created you are able to use set3DenAttribute/s to change its shape, size, color, brush, name etc.

Can markers be put in a CfgGroups composition like they can for custom compositions in the editor??

  • Like 2

Share this post


Link to post
Share on other sites
On 2/22/2019 at 3:46 AM, pierremgi said:

_mk set3DENAttribute ["markerType",1];

As you can see in your second post in this thread. markerType is a string.

Or you could run get3DENAttribute on a real marker to see what the values should be.

 

Why did the composition thing from Larrow not work? can you not put markers into compositions?

Share this post


Link to post
Share on other sites

Just trying to think outside the box...

 

Shame we cannot force a mouse down or a place action...

Spoiler

fnc_3denPlaceAreaMarker = {
	with uiNamespace do {
		params[ [ "_worldPos", [0,0,0] ], [ "_isRectangle", false ] ];

		_mapCtrl = findDisplay 313 displayCtrl 51;
		_mapCtrl ctrlMapAnimAdd[ 0, ctrlMapScale _mapCtrl, _worldPos ];
		ctrlMapAnimCommit _mapCtrl;

		do3DENAction"SelectMarkerMode";
		do3DENAction"SelectSubmode2";
		
		_assetMarkerPanel = findDisplay 313 displayCtrl 1021 controlsGroupCtrl 1039 controlsGroupCtrl 1049 controlsGroupCtrl 70;
		_assetMarkerPanel tvSetCurSel ( [ [0], [1] ] select _isRectangle );

		setMousePosition[ 0.5, 0.5 ];

		//DO MOUSE INPUT

		get3DENSelected "Marker" select 0;
	};
};

_marker = [] call fnc_3denPlaceAreaMarker;

 

This does leave an area marker on the mouse cursor ready to place at the correct position.

 

 

Or that the panel create doesn't populate properly (presume its handled in the engine as there is very little code handled from the display or its controls inits)

Spoiler

fnc_3denPlaceAreaMarker = {
	disableSerialization;
	params[ [ "_worldPos", [0,0,0] ], [ "_isRectangle", false ] ];

	_mapCtrl = findDisplay 313 displayCtrl 51;
	_mapCtrl ctrlMapAnimAdd[ 0, ctrlMapScale _mapCtrl, _worldPos ];
	ctrlMapAnimCommit _mapCtrl;

	do3DENAction"SelectMarkerMode";
	do3DENAction"SelectSubmode2";

	findDisplay 313 createDisplay "Display3DENPlace";
	waitUntil{ !isNull findDisplay 321 };

	_display = findDisplay 321;
	_modeToolbox = _display displayCtrl 1039 controlsGroupCtrl 53;
	_subModeToolbox = _display displayCtrl 1039 controlsGroupCtrl 54;
	_createPanel = _display displayCtrl 1039 controlsGroupCtrl 1049;
	_markersTree = _createPanel controlsGroupCtrl 70;

	{
		_x params[ "_panel", "_select" ];

		_panel ctrlShow true;
		_panel ctrlSetFade 0;
		_panel ctrlEnable true;
		_panel ctrlCommit 0;

		if !( isNil "_select" ) then {
			if ( _select isEqualType 0 ) then {
				_panel lbSetCurSel _select;
			};

			if ( _select isEqualType [] ) then {
				_panel tvSetCurSel _select;
			};
		};
	}forEach [
		[ _modeToolbox, 5 ],
		[ _subModeToolbox, 1 ],
		[ _createPanel ],
		[ _markersTree, [ [0], [1] ] select _isRectangle ]
	];

	//PRESS OK BUTTON
	//ctrlActivate ( _display displayCtrl 1 );
};

_nul = [] spawn fnc_3denPlaceAreaMarker;
_marker = get3DENSelected "Marker" select 0;

 

 

 

  • Like 2

Share this post


Link to post
Share on other sites

I'm not sure if I need to get out more but this is the best news I have seen in a good long while...

From create3DENEntity Example 5;
 

Create shape marker (since Arma 3 v2.05.147769)

m = create3DENEntity ["Marker", "", position player]; // default rectangular marker
m set3DENAttribute ["markerType", 1]; // 0 - rectangle; 1 - ellipse 
m set3DENAttribute ["brush", "DiagGrid"];

SOOOOOOON! 

  • Like 2

Share this post


Link to post
Share on other sites
On 3/14/2019 at 12:15 AM, Maff said:

Still no joy.

 

@Dedmen
@killzone_kid

Apologies for the summons... Any ideas?

 

Only noticed it today. If you want help, discord is where it at

  • Confused 1

Share this post


Link to post
Share on other sites

@Maff Hey there, I tried 

 

m = create3DENEntity ["Marker", "", position player]; 
m set3DENAttribute ["markerType", 1]; 
m set3DENAttribute ["brush", "DiagGrid"];

in debug, does nothing, no error 

I am trying to spawn area marker. 

 

 

Share this post


Link to post
Share on other sites
On 5/25/2023 at 5:16 PM, kibaBG said:

@Maff Hey there, I tried 

 


m = create3DENEntity ["Marker", "", position player]; 
m set3DENAttribute ["markerType", 1]; 
m set3DENAttribute ["brush", "DiagGrid"];

in debug, does nothing, no error 

I am trying to spawn area marker. 

 

 

Sorry for the delay. I have been away from Arma for 8 months.
I'm currently waiting on a new motherboard so I cannot test this, but I swear I was creating AREA markers in 3DEN with;

_m = create3DENEntity ["Marker", "", [0,0,0]];
_m set3DENAttribute ["markerType", 1];
_m set3DENAttribute ["size2", [250,250]];
_m set3DENAttribute ["baseColor", "ColorEAST"];
_m set3DENAttribute ["brush", "Border"];

Hopefully that'll do the job.
 

  • Like 1

Share this post


Link to post
Share on other sites

Original code working fine here:

 

3rBMkRX.png

Share this post


Link to post
Share on other sites
On 5/25/2023 at 6:16 PM, kibaBG said:

@Maff Hey there, I tried


m = create3DENEntity ["Marker", "", position player]; 
m set3DENAttribute ["markerType", 1]; 
m set3DENAttribute ["brush", "DiagGrid"];

in debug, does nothing, no error 

I am trying to spawn area marker. 

 

It's OK but I guess you would like to keep this marker once in game. Here, the marker is visible in 3den (editor) only. You need to createMarker by script for the game.

Share this post


Link to post
Share on other sites
10 hours ago, pierremgi said:

Here, the marker is visible in 3den (editor) only. You need to createMarker by script for the game.

Markers created in 3DEN no longer show up in game?
Is it just area markers? Or icon markers too. 😱

Share this post


Link to post
Share on other sites

They appear in-game fine for me! Area and icon types.

  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×