Hi,
I'm trying to make a trigger that reduces the cooldown of abilities when cast by a Hero, but it doesn't seem to be working. The text message reads correctly but it doesn't actually reduce... My test has a spell on 30 second cooldown and when cast the text reads 20 seconds but I have timed it and it's still 30 seconds! What am I doing wrong?? I think the event might be the problem?? Also I can't work out how to post it as a trigger so a code will have to do...
EDIT - I have just tried "unit begins casting" and it works, but spells obviously don't actual get cast before they are put on cooldown... any ideas of how to make this work??
I'm trying to make a trigger that reduces the cooldown of abilities when cast by a Hero, but it doesn't seem to be working. The text message reads correctly but it doesn't actually reduce... My test has a spell on 30 second cooldown and when cast the text reads 20 seconds but I have timed it and it's still 30 seconds! What am I doing wrong?? I think the event might be the problem?? Also I can't work out how to post it as a trigger so a code will have to do...
Code:
Hero Spell Cooldown
Events
Unit - A unit Starts the effect of an ability
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
Set VariableSet TempUnit = (Triggering unit)
Set VariableSet TempAbilityCode = (Ability being cast)
Set VariableSet TempInt = (Level of TempAbilityCode for TempUnit)
Set VariableSet TempReal = (1.00 + ((Real((Intelligence of TempUnit (Include bonuses)))) / 200.00))
Unit - For Unit TempUnit, start cooldown of ability (Ability being cast) " over "((Ability: (Unit: TempUnit's Ability with Ability Code: TempAbilityCode)'s Real Level Field Cooldown ('acdn'), of Level: TempInt) / TempReal) seconds.
Game - Display to (All players) the text: (String((Ability Cooldown Remaining of TempUnit for ability TempAbilityCode..)))
EDIT - I have just tried "unit begins casting" and it works, but spells obviously don't actual get cast before they are put on cooldown... any ideas of how to make this work??
Last edited: