• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Adding cooldown to edited Channel Ability

Status
Not open for further replies.
Level 1
Joined
Aug 7, 2013
Messages
1
I'm pretty new to this whole World Editing thing on Warcraft 3, I got this problem that I've been trying to fix but I couldn't find a way to, so, I picked the Channel ability and added a trigger that makes the casting unit moving instantly to the target unit dealing some damage. I ended up being able to do that, but I can't add a cooldown to it, no matter the amount of cooldown I add to the ability on the Object Editor, it always has 0 seconds cooldown.

Any help would be appreciated.

I'm pretty sure I'll have to add a cooldown through triggers, although, there could be a way of doing it another simpler way.
 
  • Like
Reactions: Grs
Level 5
Joined
May 6, 2013
Messages
125
As blood mentioned, the move instantly trigger interrupts the casting of the spell, so its technically never executed and therefor doesn't recharge.
Possible solutions:
1: use a Wait 0 seconds (which translates to "wait <somewhere around the current latency> seconds. note that the target unit is not valid anymore after a wait, so you will have to store it to a variable, preferably to a local one
2: store caster and target into a variable and start a timer expiring after 0 seconds and Move your unit when the timer expires. Its skipping enough time for the cooldown to trigger but usually such few time that you wont see it and nothing will interfere
3: Use SetUnitX and SetUnitY natives through a custom script instead of the move instantly function. Has the problem that it pretty much ignores collision, so you can port into pretty much everything, like buildings and stuff

Fun fact: you cant set the cooldown using triggers. one of the few things you simply cant do. You can reset it, but thats the exact opposite of what you want to do.
 
basicaly you should give the time for the ability to casted first before move the hero because it will make the cast cancelled

The problem is with the GUI action move unit instantly.
If he has to move the unit instantly for the spell for effects or for the spell to look right then it wont work.
Thats why he needs the custom script.
 
Status
Not open for further replies.
Top