#How to make a buff that changes other skill's cooldown?

1 messages · Page 1 of 1 (latest)

jaunty radish
#

I wanna make a spell that when casted makes other abilitiy's cooldown lower, like Clockwerk's Aghanim Scepter makes his Rocket Flare have 3 sec CD. I understand the part where I check for a buff (using HasModifier() function), but I can't find how do I change the ability's cooldown via code.

proud hare
#
  1. ability:EndCooldown() to end current cooldown
  2. ability:UseResources(false, false, false, true) -- this thing considers cdr and rest effects while StartCooldown considers nothing
#

Better approach would be override GetCooldown and return cd value based on your modifier so ui will be updated too

jaunty radish
#

im sorry, i dont understand

#

if caster:HasModifier("modifier_zeus_thunders_fury") then
self:EndCooldown()
self:UseResources(false, false, false, true)
end

#

like this?

#

i basically have zeus's first skill and want to make his ult to make first skill's cooldown like 0.2 seconds

#

so you press ult and then spam first skill like crazy

#

oh nvm i understood

#

function ability_enrage:GetCooldown( level )
if self:GetCaster():HasScepter() then
return self:GetSpecialValueFor( "cooldown_scepter" )
end

return self.BaseClass.GetCooldown( self, level )

end

#

i found this on ursa's skills

plucky sinew
#

i'm fairly certain AbilityCooldown is an ability special yo can override using MODIFIER_PROPERT_OVERRIDE_ABILITY_SPECIAL_VALUE or whatever tis called

jaunty radish
#

i got it

#

function zeus_arc:GetCooldown()
if self:GetCaster():HasModifier("modifier_zeus_thunders_fury") then
return self:GetSpecialValueFor("furious_cooldown")
end

return self.BaseClass.GetCooldown(self, level)

end