Weapon Icon String

Hi, first post here so I hope I’m doing this right. Essentially I need to get the icon for Mercy’s pistol in my HUD text. I can only seem to get the icon for her staff. Can anyone help?

Seems that there is only default icon set for Mercy which is the Cadeceus Staff for now, there is no way to obtain the Pistol icon with the Ability Icon string right now. Here is a code snippet you can try to also test if that applies for other Heroes too like Torbjörn:

variables
{
	global:
		0: AbilityHUD

	player:
		0: Visibilty
}

rule("Create HUD")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create HUD Text(Array(Null, Local Player)[Local Player.Visibilty], Custom String("{0}", Ability Icon String(Hero(Mercy), Button(
			Primary Fire))), Null, Null, Left, 0, Color(Red), Color(White), Color(White), Visible To Sort Order String and Color,
			Default Visibility);
		Global.AbilityHUD = Last Text ID;
	}
}

rule("Toggle visibilty of the HUD for each Player individually either becomes Null or Local Player (the individual Player)")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Is Button Held(Event Player, Button(Interact)) == True;
	}

	actions
	{
		Disallow Button(Event Player, Button(Interact));
		If(Event Player.Visibilty == False);
			Event Player.Visibilty = True;
		Else If(Event Player.Visibilty == True);
			Event Player.Visibilty = False;
		Else;
			Allow Button(Event Player, Button(Interact));
			Abort;
		End;
		Wait Until(!Is Button Held(Event Player, Button(Interact)), 2);
		Allow Button(Event Player, Button(Interact));
	}
}
2 Likes

Thanks for the reply. Currently I’m just using Tracer’s Primary Fire icon as a placeholder so it’s not incredibly crucial. Thanks for the confirmation!

1 Like