#How to make abilities castable while on cooldown?
1 messages · Page 1 of 1 (latest)
you can set abilities cooldown to 0 and use startcooldown when you need start cooldown
use order filter or order modifier event, and then ability:OnSpellStart()
pretty sure it wouldnt make it to the order filter because the client is going to reject the order before its sent to the server
you would need to convince the client that the ability is not currently on cooldown to be able to attempt sending a cast order to the server.
Both the order filter and modifier event don't trigger when trying to cast an ability on cooldown. 😦
welp, then panorama wizardry is needed
What is exactly the usecase here where an ability should be in cooldown and still be usable? Maybe there's an easier way to achieve what you need, you just never told us what you need (just your approach)
I want to have a reward which allows abilities to be cast while on cooldown with the downside of having to spent health depending on the remaining cooldown.
Yeah, alright. I don't see a way around it then
I think I will just change the reward to a similar effect.
need custom cast system and panorama for it yeah
Maybe something like allow to cast while stunned for HP?
I just changed it to cooldown reduction and a percentage health cost.
If I were to do this with buffs on the hero (cooldown is always 0, costs health if you have the buff on you, buff lasts for as long as the cooldown would), would I be able to grab the modifier and add custom panorama UI to make it more readable to the user?
tl;dr: Can panorama access modifiers on a hero?
It can, but it has limited information compares to the server
But if you're just checking if the buff exists then yeah, easily
Modifiers are one of those things that contain a lot of info on the client, I wouldn't say it's limited
It's somewhat limited on the panorama side is what I meant
https://github.com/DankBudd/mountain/blob/master/content/dota_addons/frostivus/panorama/scripts/custom_game/util.js am I allowed to link this? @vague marsh 🙂
Yeah, Its public so idc.
I dont remember writing those though, i probably copy pasted them from somewhere lol.
as someone who is afraid dealing with panorama, id just create a modifier that works as a legit cd, mod exist use hp, mod gone use mana. make ability CD 0
There are some issues I can think of with that approach.
First, that means you have to make all abilities look for the modifier and set their cooldown to 0 (GetCooldown()). The same can be said about their mana or HP cost.
This can be achieved by using a baseclass, but also means it may override or be overriden other GetCooldown modifications you want to do for the ability. The same can be said for their mana/HP cost, which would change based on the existence of the modifier. Need to do this only for the relevant abilities too (e.g. not relevant for passives)
Second, that means you'll lose the visible part of the cooldown (which shows in numbers how long until the cooldown is actually off). This is relevant when you don't want to use it, just know how far it is from being ready. A modifier is not that clear, since it's a circle.
Thirdly, if you do decide to show this modifier that counts the "legit cd", you will have about 4 modifiers counting your CD for most heroes, which clutters your modifiers UI.
So while it's possible I wouldn't dismiss the panorama method even if it's scary.
It just ocurred to me that dota has already something similar: Ability charges.
I could just set the ability charges to 2 and treat the ability "on cooldown" when only 1 charge is remaining.
You could but even then comes with a host of issues such as having charges UI
Yup, but still better than with modifiers and no panorama required.
So I think I will go with that for now...