Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
As far as I know Reforged does not have anything specifically for passives.
There is a new action "Unit - Start Unit Ability Cooldown" but it does not work for passives. Even if it did, I don't think the internal implementation of passives take cooldown into account (except for passives like Exhume Corpses, which by default use cooldown).
The resource you linked should work even on Reforged. But there is a potential issue because of the following:
JASS:
//inside Trig_Passive_Cooldown_System_Execute function
call SetPlayerAlliance(Player(14), GetOwningPlayer(udg_PCD_Unit), ALLIANCE_PASSIVE, true)
which I imagine was one of the neutral players in old WC3, but in Reforged this matches one of actual players.
Looking a bit deeper, the resource uses "Spell Shield" passive to display cooldown, but that spell's cooldown is shared globally. So if one unit triggers it, all the other do as well.
So in that respect Reforge does improve the situation because the action "Unit - Start Unit Ability Cooldown" affects only single unit.
You can use the following approach on Reforged:
have passive ability
have a dummy active ability which visually matches the passive and will be used to show cooldown
when passive should go on cooldown, replace it with the active dummy ability and use the "Unit - Start Unit Ability Cooldow" action to force it into cooldown.
You don't need to remove the passive ability from the unit, you can hide it using the "Unit - Disable Ability" action.
As for how to detect when cooldown ends - I don't think you have many options. You can either:
use standard indexing approach, where you track the cooldown in an integer array and have a loop trigger that runs every 0.1 seconds (in case its fine if there is slight inaccuracy in when you swap abilities back)
use same approach as in the resource you linked: managed timers
Exhume Corpses is a far superior method to whatever is going on with spell shield there. You can detect when the cooldown is over because it will automatically cast again (which you can reset).
Passive ability with cooldown - the easy way! The hardest part of this tutorial is formatting it properly :( Introduction First of all, this tutorial is not a copy of this. This tutorial presents a new way to make passives with cooldown. This is not attack-based, instead it gives you a passive...
www.hiveworkshop.com
Ability field natives allow the cooldown to be dynamic as you desire.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.