Disable abilities

Status
Not open for further replies.
Level 17
Joined
Mar 21, 2011
Messages
1,611
Hi,
i want to disable all abilities of unit u for x seconds.
The unit is invulnerable while that so it is not possible to cast silence on it.
i want to know if there is a simple trick to do that, i thought about blademaster ultimate that "silences" all of his abilities while active, but that messes up animations.
my last solution would be to hide abilities and replace them by placeholders, but i dont want to do that.
 
Level 14
Joined
Nov 17, 2010
Messages
1,266
You could use a blank channel ability that has disable other abilities ticked. You can just set the duration to whatever you want. I'm not sure if that would mess with animations though. You may have to set the units follow through time to 0.00
 
Level 14
Joined
Nov 17, 2010
Messages
1,266
Ah. Right. Well that's a tough one. You may have to resort to your backup idea. Unless you could silence him right before making him invulnerable. Or find a way to make silence target invulnerable units too...
 

EdgeOfChaos

E

EdgeOfChaos

Try having a dummy cast Doom, and in the fields for Doom select "Invulnerable" as an option.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Is it always the same set of abilities / the same unit type that you need this for? Disabling the ability for a player means all their units won't be able to use the ability. Disabling abilities also hides them - if it is for a unit where each player can have only one of, it will work to disable. If not, you could try removing and re-adding the abilities after the duration, but that will probably get ugly with hero abilities (tbh, I don't know what happens if you remove hero abilities via triggers).

You could have the abilities require a certain other unit (under tech requirements). Spawn that unit when the hero or whatever is chosen. When the unit's abilities are disabled, you remove the dummy tech requirement unit. Add it back after the duration. You can name it anything you want and it will appear in the ability description like:
Requires:
- Can't cast right now

You can probably change it from "Requires:" to something else in the game interface, but it would change it for everything.

If the unit doesn't need to move or attack, you could just pause them with triggers - I think it should be safe if they are invulnerable since most of the bugs are with buffs and DOTs which most likely can't be applied while the unit is invulnerable. Still could be buggy, though.
 
Level 15
Joined
Aug 14, 2007
Messages
936
To go off topic awhile, I was making a copy ability that works like rubick's ultimate from dota. I noticed that when you add ability it will make the ability stay and when you level up I assume that the engine only checks if the hero has the ability. Therefore removing the ability then learning from the hero UI actually creates a new add ability by the engine (unsure requires confirmation, just a guess). As long as you remove and add again, the ability will be totally new, cooldown reset etc.

Edit: although to say a cooldown reset is just a straight out lie it's actually a new ability with the same properties.
 
Level 17
Joined
Mar 21, 2011
Messages
1,611
"to hide abilities and replace them by placeholders, but i dont want to do that."

Lemme fix that for you:
"to fix it by a really useful solution that repeatedly proves to be more useful than it seemed, but i dont want to do that."

i got a bunch of abilities in my map and it would be really time consuming to create a disabled ability for each of them, that's why. and i'm lazy ;)
 
Level 7
Joined
Nov 19, 2015
Messages
283
Not tested and you might have already tried this. Have you tried changing the targets allowed to allow invulnerable?

Also would it be possible to silence the target before making them invulnerable?
 
Status
Not open for further replies.
Top