Jump to content
gc8

Group icons on map

Recommended Posts

Hi

is it possible to show group icons on map like the high command module allows you to see them but without the HC module/commander ?

 

thx!

Share this post


Link to post
Share on other sites
53 minutes ago, gc8 said:

Hi

is it possible to show group icons on map like the high command module allows you to see them but without the HC module/commander ?

 

thx!

Quickly threw this one together:

 


findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw", "
	_display = _this#0;
	{
		_icon = getText (configfile >> 'CfgVehicles' >> typeof _x >> 'icon');
	    	_display drawIcon [
	    		_icon,
	    		[0,0,1,1],
	    		getPosVisual _x,
	    		24,
	    		24,
	    		getDirVisual _x,
	    		name _x,
	    		1,
	    		0.03,
	    		'TahomaB',
	    		'right'
	    	];
		_display drawLine [
			getPosVisual _x,
			getPosVisual leader _x,
			[0,0,1,1]
		];
	} forEach allUnits;

	{

		_offSet = [50,50,0];
		_iconPos = getPosVisual leader _x vectorAdd _offSet;
		_icon = getText (configfile >> 'cfgGroupIcons' >> _x getVariable ['GOM_fnc_groupIcon','b_inf'] >> 'icon');
		_grpInfoText = _x getVariable ['GOM_fnc_groupInfoText','Unnamed'];
    	_display drawIcon [
    		_icon,
    		[1,1,1,1],
    		_iconPos,
    		24,
    		24,
    		0,
    		_grpInfoText,
    		1,
    		0.03,
    		'TahomaB',
    		'left'
    	];
		_display drawLine [
			_iconPos,
			getPosVisual leader _x,
			[0,0,1,1]
		];


	} forEach allGroups;


"];

This will draw all units as icons, lines from each unit to its group leader and a designated group icon with customizable offset with another line connecting it to the respective group leader.

You can add custom info per group like this:

group this setVariable ["GOM_fnc_groupInfoText","1st Airborne"];//some random text you want
group this setVariable ["GOM_fnc_groupIcon","b_air"];//has to be valid icon class from configfile >> "cfgGroupIcons", defaults to "b_inf"

 

 

Cheers

  • Like 5
  • Thanks 2

Share this post


Link to post
Share on other sites

@Grumpy Old Man Thanks, I was mainly concerned if there existed a away to do that without coding. One thing I would like to have is existing function to determine the groups type whether it's infantry, mech, armor etc. So that proper icon can be drawn

Share this post


Link to post
Share on other sites
40 minutes ago, gc8 said:

@Grumpy Old Man Thanks, I was mainly concerned if there existed a away to do that without coding. One thing I would like to have is existing function to determine the groups type whether it's infantry, mech, armor etc. So that proper icon can be drawn

Well you'd have to find a way to call those functions anyway, so there's no way around using a script in the first place.

I guess HC modules simply go through the config, no idea how to access group icons otherwise, group icons are defined via cfgGroupIcons.

 

Cheers

Share this post


Link to post
Share on other sites

I can make the icons shown by inserting HC module but I cannot make it so that someone else than player would be the commander, tried sync and everything.... 

 

Share this post


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

Hi

is it possible to show group icons on map like the high command module allows you to see them but without the HC module/commander ?

 

thx!

If you want to do it all yourself then you need to look at the commands for groupIcons, see the other relevant commands at the bottom of the linked page under Additional Information.

 

If you dont wish to setup your own system manually via the script commands, you can place down a module in Eden Systems > Modules > Other > Military Symbols. This is exactly the same system that the high command module sets up for you, and is known as MARTA.

You will then need to set icons as visible...

setGroupIconsVisible[true,true];

...You can place this into the modules init if you wish.

 

This should be enough to get the markers displaying. There are several variables you can add to both the module and each local player to set up further functionality, its worth reading through both...

  • \a3\modules_f\marta\data\scripts\  especially main.sqf
  • and the marta fsm \a3\modules_f\marta\data\fsms\marta_local.fsm

 

One that is worth knowing about that is placed on the player.

"MARTA_HIDE" any groups placed in this array will have their icons hidden even if the player knows about them.

player setVariable[ "MARTA_HIDE", [ /*Groups to hide*/ ]];

 

 

  • Like 6
  • Thanks 2

Share this post


Link to post
Share on other sites

@Larrow Thanks, the Military Symbols is just what I need

Share this post


Link to post
Share on other sites
17 hours ago, Larrow said:

setGroupIconsVisible[true,true];

"MARTA_HIDE" any groups placed in this array will have their icons hidden even if the player knows about them.


player setVariable[ "MARTA_HIDE", [ /*Groups to hide*/ ]];

 

 

 

Hi @Larrow  Looking for the contrary (all groups revealed, even enemies). I looked at main.sqf and fsm but it seems the loops are scouting for friendly factions only. Any idea for overriding this limitation?

tks.

Share this post


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

Hi @Larrow  Looking for the contrary (all groups revealed, even enemies). I looked at main.sqf and fsm but it seems the loops are scouting for friendly factions only. Any idea for overriding this limitation?

_enemyGroups = allGroups select { playerSide getFriend side _x <= 0.6 };
player setVariable [ "MARTA_REVEAL", _enemyGroups ];

 

  • Like 4

Share this post


Link to post
Share on other sites
22 minutes ago, Larrow said:

_enemyGroups = allGroups select { playerSide getFriend side _x <= 0.6 };
player setVariable [ "MARTA_REVEAL", _enemyGroups ];

 

Thanks!

Share this post


Link to post
Share on other sites

Some more info here about some of the other stuff that can be setup for MARTA.

https://community.bistudio.com/wiki/Military_Symbols

 

MARTA is a system ported over from Arma2 and as such does not classify some groups properly. Here is a thread discussing MARTA group icons,  how to classify a group and how to fix the icons shown by MARTA.

  • Like 3

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

×