afisakov
You can change this now in User CP.
- Reaction score
- 37
I know how to change the aoe or distance an ability flies based on variables, but I don;t know how to determine cast range based on it.
I thought of setting cast range to 9999 and adding a condition like:
However, if it if false it not only prevents the cast but also puts the ability ability into cooldown. Given a 10 sec cooldown I would prefer if players didn't lose their chance to cast too often to errors.
Is there a better way to do it, or maybe a way to reset the ability's cooldown if cannot cast?
P.S. initial ability condition is
"return (GetSpellAbilityId()=='A0AW')" and runs before the one listed above
I thought of setting cast range to 9999 and adding a condition like:
Code:
set tp1=GetUnitLoc(caster)
set tp2=GetUnitLoc(target)
set ax=DistanceBetweenPoints(tp1,tp2)
call RemoveLocation(tp1)
call RemoveLocation(tp2)
if(ax<600.+myvariable)then
return true
endif
return false
Is there a better way to do it, or maybe a way to reset the ability's cooldown if cannot cast?
P.S. initial ability condition is
"return (GetSpellAbilityId()=='A0AW')" and runs before the one listed above