I am trying to create a Kiriko boss battle kind of custom game and I want her to have an additional suzu when she ults with a 7 second cooldown after she uses the second one but I am not sure how to do that part. I have coded it where she has no cooldown while she is in her ult now I just need to add the 7 second cooldown after her second use.
you to create a variable for the charge counter-
detect when the ability is used, using a method of choice and decrease that charge counter by 1, you can also do a Wait Until [Ability Cooldown, Ability 2 != 0], 1 and then set the cooldown to 0 with Set Ability Cooldown to remove the base game cooldown.
have a rule that checks for when the charge is less then your max of choice have the first action be wait [time of the replenish], abort when false then increase the charge by 1.
on respawn, reset the charges to the max amount.. this can be detected using a rule that checks if the player is dead.. waits until the player is alive again and then wait a split second and check if they are a spawn room or not (this prevents reset on resurrect from Mercy)
When the charge is 0 you want to Disallow Ability 2 to prevent the ability being used
When the charge is over 0 you can use Allow Ability 2 to allow the user to access the ability again, also remove any cooldown the ability has by doing Set Ability Cooldown, Ability 2, 0/null
As for the visual cooldown you can store the replenish time into a variable if you want then show that cooldown when you have 0 charges left, or you can just remove the visual all together.
the final thing you need is the charge indicator which you can either put on a simple hud that im sure you can figure out on your own, or using a more complex in-world text to position a hud element in a custom position- like for instance above the ability on the hud.
(if its not already clear, this is not my first time doing this)
Should I do different rules sections for this?