How can i reduce a cooldown of an ability by dealing damage?

Hello everyone! I hope everyone is doing well, i searched everywhere and i had found similar questions like mine about wether if it’s possible to reduce a cooldown for an ability by dealing damage to an enemy? And i tried the solutions yet it didnt work sadly…

To be more specific i want for Soldier to have his rocket’s cooldown, Lets say for example 6s cd to be reduced each time he deals damage, almost identical to how kiriko’s kitsune rush works with the cooldowns.

Is it possible? And thank you for your time :rose::pray:t2:

Is this what you want?

rule("Rule 1")
{
	event
	{
		Player Dealt Damage;
		All;
		Soldier: 76;
	}

	conditions
	{
		Event Ability == Button(Secondary Fire);
	}

	actions
	{
		Set Ability Cooldown(Event Player, Button(Secondary Fire), 3);
		Wait(2, Ignore Condition);
	}
}

Hello uhh not really… i’m not really looking for wether if soldier dealt damage set the cooldown to 3s or a certain number, i meant in general not making the cooldown to the half or to a certain number , i mean like gradually from 6s to 0 by dealing damage , What you did here is only if he did a small damage or 1 shot at least, i’m talking about while dealing more damage the cooldown gets faster by the time, i’m no sure if you got what i mean :sweat_smile: but Thank you for your response and your help!

So something like this should work; you are basically taking the current cooldown and subtracting 0.5 secs from it;

rule("Rule 1")
{
	event
	{
		Player Dealt Damage;
		All;
		Soldier: 76;
	}

	conditions
	{
	}

	actions
	{
		Set Ability Cooldown(Event Player, Button(Secondary Fire), Ability Cooldown(Event Player, Secondary Fire) - 0.5);
		Wait(0.5, Ignore Condition);
	}
}

However soldiers helix’s rockets are bugged! the cooldown always returns zero; so you need to track the rockets manually and then subtract 0.5 from that value (then you need to update your Cooldown Value to match the new cooldown)

Hey Clewster22! Thank you so much for your help and to Teakowa the person right above you, that’s exactly what i meant and thank you also for the note about the Soldier76’s Rocket glitch thing :sweat_smile::pray:t2:

Oh, I didn’t quite understand what you meant. My bad. :astonished: