Jump to content
lexx

"In-World" ORBAT marker

Recommended Posts

Sup, people.

got a new question today- in the helicopter dlc coop supply missions, friendly units carry the orbat icons as seen below:

iK481A.jpg

My question is: How exactly is this done? My own test with this can be found in the spoiler below:

		["m_arty_3d", "onEachFrame", 
		{
			_object = CSAT_ARTY1;
			_pos = getPos _object; 

			_r = profilenamespace getvariable ['Map_OPFOR_R',0];
			_g = profilenamespace getvariable ['Map_OPFOR_G',1];
			_b = profilenamespace getvariable ['Map_OPFOR_B',1];
			drawIcon3D["\a3\ui_f\data\map\Markers\NATO\o_art.paa", [_r,_g,_b,0.8], _pos, 1, 1, 0, format[""]];
			
			_pos2 = [_pos select 0, _pos select 1, (_pos select 2) + 4];
			drawIcon3D["\a3\ui_f\data\map\Markers\NATO\group_2.paa", [_r,_g,_b,0.8], _pos2, 1, 1, 0, format[""]];
		}] call BIS_fnc_addStackedEventHandler;

The thing is, in the BIS mission, the orbat marker is *always* exactly on the same position, inclusive the group size marker and the stuff to the left and right of it. With my experimentation, the markers are actually moving, depending on how far away I am from them. So while they are correctly placed at a far distance, they will have a huge amount of spacing when I am really close.

Anyone can tell me how to solve this? Do I have to use a different way to create the marker? I also wouldn't mind to move the group marker + size above on the strategic map, though I'll guess this shouldn't actually be a big problem.

Any help is appreciated.

Share this post


Link to post
Share on other sites

I think your looking for the groupIcon set of commands.

For instance place this in a units init for testing...

h = this spawn {
    _unit = _this;
    {
        if ( isClass( configFile >> "cfgGroupIcons" >> _x ) ) then {
            _nul = group _unit addGroupIcon [ _x, [ 0, 0 ] ];
        };
    }forEach [ "b_inf", "group_1" ];
    
    _iconColor = getArray( configFile >> "CfgMarkerColors" >> format[ "Color%1", side _unit call BIS_fnc_sideName ] >> "color" );
    {
        _iconColor set[ _forEachIndex, call compile _x ];
    }forEach _iconColor;
    
    
    group _unit setGroupIconParams [ _iconColor, "", 1, true ];
    
    setGroupIconsVisible [ true, true ];
};
  • Like 1

Share this post


Link to post
Share on other sites

Yeah, that's it. Awesome.

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

×