• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[General] Disable/Enable Ability <if>

Level 7
Joined
Oct 6, 2022
Messages
135
Hello I'm back for some question, How to make this:
Disable- when skill has been used(i know this)
Enable- Activates when cooldown is 0(i know this) and it wasn't silenced(i don't know this)

Basically I don't that how to make "and it wasn't silenced" since it i do the if it has buff like this like that it'll take so much time to do so since i have to find all the skills that has been made that makes silence.
Hope anyone could help me with it, thanks in advance.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
If Silence works the way I think it does, you could try adding a test ability to the unit at the 0s mark and ordering it to cast said ability. If successful, it's not silenced, otherwise, it is silenced. But if Silence only applies to abilities the unit had at the time of being Silenced then it won't work. This method also suffers from issues with Stuns/Disables that prevent the unit from casting the test ability.

Ehh, just check for the different kinds of Silence buffs, I can't imagine there's THAT many. The base skills which can silence off the top of my head:

Silence
Doom
Drunken Haze
Soul Burn*
Hex / Polymorph* (I guess this counts)

I can't think of any others... But I assume you've made custom copies of these that need to be accounted for.
 
Last edited:
Level 7
Joined
Oct 6, 2022
Messages
135
If Silence works the way I think it does, you could try adding a test ability to the unit at the 0s mark and ordering it to cast said ability. If successful, it's not silenced, otherwise, it is silenced. But if Silence only applies to abilities the unit had at the time of being Silenced then it won't work. This method also suffers from issues with Stuns/Disables that prevent the unit from casting the test ability.

Ehh, just check for the different kinds of Silence buffs, I can't imagine there's THAT many. The base skills which can silence off the top of my head:

Silence
Doom
Drunken Haze

I can't think of any others... But I assume you've made custom copies of these that need to be a counted for.
Yeah i made custom abilities based from these, but i forgot what and how many i have created so i was wondering if there's a quickest method for it.
 
Last edited:
Level 20
Joined
Feb 27, 2019
Messages
593
Maybe this can help?
 
Level 7
Joined
Oct 6, 2022
Messages
135
Maybe this can help?
They mostly used JASS but i'll try, thanks.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
They mostly used JASS but i'll try, thanks.

Detecting Silence​


There are 3 very special abilities in Warcraft. Their names are Defend, Magic Defense and Immolation. These abilities are known as detector abilities because they can be used to detect a variety of events.

What happens is that they fire an order event whenever they are silenced, or removed from a unit. Considering that the game will always silence an ability before removing it, that explains why the order is issued twice on removal. The game will also apply SilenceEx to a unit when it dies.

By having any of these abilities present in a unit all the time, we can detect when that unit gets silenced. Defend and Magic Defense can only detect SilenceEx, while Immolation can detect regular Silence as well.
Unfortunately, this appears to only tell you when a Silence starts and not when one ends. So again, checking for the Buffs is the best solution. I can't imagine it'd be THAT difficult to find all of them unless your map is massive and unorganized:
  • If - Conditions
    • Or - Multiple conditions
      • (Unit has buff A) Equal to True
      • (Unit has buff B) Equal to True
      • (Unit has buff C) Equal to True
      • (Unit has buff D) Equal to True
 
Last edited:
Top