Need some help with a custom HUD for abilities

Hello,

I’m trying to make a custom HUD for different abilities. What is does is making a HUD text for ability 1, ability 2 and secondary fire. The HUD text should be red/grey if an ability is on CD, orange if it’s in use or white if it’s ready for use.

So far it works well with most heroes.
Unfortunately, the text color for ability cooldowns (red/grey) doesn’t work for the following heroes:
Ability 1: Genji, Junkrat, Symmetra, Tracer, Zarya.
Ability 2: Tracer, Baptiste, DVA, Reinhardt, Zarya(?).
Secondary fire: Soldier, Ramattra.

Also, some heroes don’t have a secondary fire ability or ability 2. I want to hide the HUD text or replace it with an empty HUD text for these missing abilities. I tried a lot of things but couldn’t figure it out.

Can someone help me further with these 2 items?

Here are the scripts that I use:

actions
{
Create HUD Text(Local Player, Custom String(" {0} “, Ability Icon String(Hero Of(Local Player), Button(Ability 1))),
Custom String(“ABILITY 1”), Custom String(”({0})“, Input Binding String(Button(Ability 1))), Left, 102, Ability Cooldown(
Local Player, Button(Ability 1)) == 0 && Is Using Ability 1(Local Player) != True ? Color(White) : (Is Using Ability 1(
Local Player) && Ability Cooldown(Local Player, Button(Ability 1)) == 0 ? Color(Orange) : Color(Red)), Ability Cooldown(
Local Player, Button(Ability 1)) == 0 && Is Using Ability 1(Local Player) != True ? Color(White) : (Is Using Ability 1(
Local Player) && Ability Cooldown(Local Player, Button(Ability 1)) == 0 ? Color(Orange) : Color(Gray)), Ability Cooldown(
Local Player, Button(Ability 1)) == 0 && Is Using Ability 1(Local Player) != True ? Color(White) : (Is Using Ability 1(
Local Player) && Ability Cooldown(Local Player, Button(Ability 1)) == 0 ? Color(Orange) : Color(Gray)),
Visible To String and Color, Default Visibility);
Create HUD Text(Local Player, Custom String(” {0} “, Ability Icon String(Hero Of(Local Player), Button(Ability 2))),
Custom String(“ABILITY 2 “), Custom String(”({0})”, Input Binding String(Button(Ability 2))), Left, 104, Ability Cooldown(
Local Player, Button(Ability 2)) == 0 && Is Using Ability 2(Local Player) != True ? Color(White) : (Is Using Ability 2(
Local Player) && Ability Cooldown(Local Player, Button(Ability 2)) == 0 ? Color(Orange) : Color(Red)), Ability Cooldown(
Local Player, Button(Ability 2)) == 0 && Is Using Ability 2(Local Player) != True ? Color(White) : (Is Using Ability 2(
Local Player) && Ability Cooldown(Local Player, Button(Ability 2)) == 0 ? Color(Orange) : Color(Gray)), Ability Cooldown(
Local Player, Button(Ability 2)) == 0 && Is Using Ability 2(Local Player) != True ? Color(White) : (Is Using Ability 2(
Local Player) && Ability Cooldown(Local Player, Button(Ability 2)) == 0 ? Color(Orange) : Color(Gray)),
Visible To String and Color, Default Visibility);
Create HUD Text(Local Player, Custom String(” {0} “, Ability Icon String(Hero Of(Local Player), Button(Secondary Fire))),
Custom String(“Secondary”), Custom String(”({0})", Input Binding String(Button(Secondary Fire))), Left, 106, Ability Cooldown(
Local Player, Button(Secondary Fire)) == 0 && Is Firing Secondary(Local Player) != True ? Color(White) : (Is Firing Secondary(
Local Player) ? Color(Orange) : Color(Red)), Ability Cooldown(Local Player, Button(Secondary Fire))
== 0 && Is Firing Secondary(Local Player) != True ? Color(White) : (Is Firing Secondary(Local Player) ? Color(Orange) : Color(
Gray)), Ability Cooldown(Local Player, Button(Secondary Fire)) == 0 && Is Firing Secondary(Local Player) != True ? Color(White)
: (Is Firing Secondary(Local Player) ? Color(Orange) : Color(Gray)), Visible To String and Color, Default Visibility);
}

Some heroes’ cooldowns can’t be detected. I don’t think there’s a solution, just the Workshop being bugged :confused:

I made a list of the abilities and their cooldowns, marking those that work and those that don’t, and those heroes that you say in your post don’t work correctly.

That’s a shame… I hope it’s still possible to find a workaround to detect those cooldowns in a different way.
I already found a solution for hiding the HUD text, so that item has already been solved.