Jump to content
alleycat

Marker icons floating above units?

Recommended Posts

Saw in a random mp mission that certain units had marker icons float above them in the 3d view. How would I do that?

Share this post


Link to post
Share on other sites

Thanks.

When using it in a foreach it wont work:

{



addMissionEventHandler ["Draw3D", { drawIcon3D ["\A3\ui_f\data\map\markers\military\destroy_ca.paa", [0.5,0,0,0.4], getPos _x, 0.3, 0.3, 360, "", 0, 0.03, "Purista"]; }];

} forEach allUnits;

The error is caused by getPos _x. In the init.sqf

Share this post


Link to post
Share on other sites
addMissionEventHandler ["Draw3D", {
{
	drawIcon3D ["\A3\ui_f\data\map\markers\military\destroy_ca.paa",
	[0.5,0,0,0.4],
	[getPos _x select 0, getPos _x select 1, 2],
	2, 2,
	360,
	"",
	0,
	0.03,
	"PuristaMedium"
	];
}foreach allunits;
}];

foreach needs to be inside the EH code block, changed the getpos so its 2m up so it shows above units head, resized the icon to 2,2 as 0.3 was tiny, Purista as a font seems to no longer exist changed to PuristaMedium.

Edited by Larrow
readability of code

Share this post


Link to post
Share on other sites

When I attempt this

	_x addMissionEventHandler 
[
"Draw3D", 
{ drawIcon3D ["\A3\ui_f\data\map\markers\military\destroy_ca.paa", 
[0.5,0,0,0.4], 
(getPos _x), 
0.3, 0.3, 360, 
"", 
0, 
0.03, 
"Purista"
];
}



];

It says missing ; on the first line

Share this post


Link to post
Share on other sites

onEachFrame would probably work better

{
onEachFrame {
	drawIcon3D ["\A3\ui_f\data\map\markers\military\destroy_ca.paa", [0.5,0,0,0.4], (getPos _x),0.3,0.3,360,"",0, 0.03,"Purista"];
};
} foreach playableunits;

Edited by dcthehole

Share this post


Link to post
Share on other sites

I will try that, thanks. However how costly are these icons?

Share this post


Link to post
Share on other sites
On 9/15/2013 at 9:37 AM, dcthehole said:

{ onEachFrame { drawIcon3D ["\A3\ui_f\data\map\markers\military\destroy_ca.paa", [0.5,0,0,0.4], (getPos _x),0.3,0.3,360,"",0, 0.03,"Purista"]; }; } foreach playableunits;

The solution posted above works great for using a military marker icon floating over a unit. 

 

I want to use one of the Task Icons found at the bottom of the Task Overhaul page as a floating icon.

 

Does anyone know the path structure to these Task icon .paa files?

Share this post


Link to post
Share on other sites
17 minutes ago, johnnyboy said:

 

Does anyone know the path structure to these Task icon .paa files?

 

You can use BIS_fnc_taskTypeIcon:

_icon = ["land"] call BIS_fnc_taskTypeIcon;

 

Or,  if you want to get every the path for every single task icon then:

copyToClipboard format ["[type, file path]%1%2",
	endl,
	"true" configClasses (configfile >> "CfgTaskTypes") apply {[configName _x, getText (_x >> "icon")]} joinString endl
];

which will give:

...
["kill","\A3\ui_f\data\igui\cfg\simpleTasks\types\kill_ca.paa"]
["land","\A3\ui_f\data\igui\cfg\simpleTasks\types\land_ca.paa"]
...

 

  • Like 2
  • 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

×