I have an ability that applies a modifier when cast.
Right now what happens is
- A-click
--hero starts auto-attacking bot- I press Q
--modifier is applied, but hero stops auto-attacking- A-click again and the auto attack resumes
--want to not have to a-click again
What I want is
- A-click
--hero starts auto-attacking bot- I press Q
--modifier is added, auto-attack timer is reset, and hero continues auto-attacking the original target without needing to press any more buttons.
Code for ability is below.
yuki_q = class({})
LinkLuaModifier("modifier_yuki_q", "abilities/yuki/modifier_yuki_q", LUA_MODIFIER_MOTION_NONE)
print("yuki q loaded at least")
function yuki_q:OnSpellStart()
print("adding yuki Q modifier")
local caster = self:GetCaster()
print("adding new modifier")
caster:AddNewModifier(caster, self, "modifier_yuki_q", {})
end