- Joined
- Jun 27, 2010
- Messages
- 2,776
A simple question , I want to make ability that is hidden in a hero unit, but it works. So, how to hide it? I know i can hide channel, but I want it to be normal passive ability.
I dont really understand what you say.
As far as I understand, you have an ability like hardened skin that you want to give to your unit, but without showing the icon.
In that case, make a spellbook.
Give the spellbook a base order ID that you will use for all hidden abilities like these.
I use windwalk because I would never use that basic ability
Add the hardened skin (your ability) to the spellbook and add the spellbook to the unit.
Then use this trigger:
This trigger will hide the spell book and prevent all access to it.
Disable Spellbooks
Events
Map initialization
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Disable Spell Book for (Picked player)
So you will not be able to cast abilities manually (maybe they are castable via triggers but I dont know for sure).
However the passive effects still remain, so your unit still has the benefits from Hardened Skin.
(The level of Hardened Skin is also 1 (or higher) because the unit has the ability.)
Or do what LordDz said.
It seems to work but I have never heard of it before... Maybe there is a drawback from it because I dont know why everyone uses this method over Button -11.
How did you do it?Set the button positions of the passive ability to:
Button X: 0
Button Y: -11
Shift can be used to say "I'm certain I want to be allowed to put whatever I want". Maybe you also need to go File -> Preferences -> General and check the "Allow Negative Values"How did you do it?
The WE doesn't allow more then 1 number in X and Y coordinate. No other symbols like + or -.
shift+click/enter to force edit raw dataminXp said:How did you do it?
The WE doesn't allow more then 1 number in X and Y coordinate. No other symbols like + or -.
Do you know if the hide ability and the disable ability still work? I tried both methods on the harvest gold and lumber unit abilities and both disabled the ability. Is their a new method to hide unit/hero abilities and have them still work?Well, now that we're here, let's just get it all out.
It all depends on the patch you're on.
For most commonly used versions you can hide the ability like others have said using 0, -11 for the X/Y button positions inside the Object Editor.
Alternatively, in 1.31+ you have access to two functions for hiding an ability:
Keep in mind that these functions use a counter system to track the state of Disabled/Hidden (each have their own counters). These counters can go positive or negative. While a counter is at it's default value of 0 the ability is enabled/visible.
Unit - For (Triggering unit), Ability Animate Dead, Hide ability: True
Unit - For (Triggering unit), Ability Animate Dead, Disable ability: True, Hide UI: True
In older patches you needed to rely on disabled Spellbooks, but this is no longer the case and should not be used if you have access to the above methods.
Not sure what you mean. They should still work, maybe you're not using them correctly?
Disable and hide ability:
Enable and show ability:
Unit - For (Triggering unit), Ability Animate Dead, Disable ability: True, Hide UI: True
Unit - For (Triggering unit), Ability Animate Dead, Disable ability: False, Hide UI: False
I tried this. It hides the ability and disables it.
Seems like they changed that feature for some reason. But good idea to try the art button positions instead!You can also hide any ability by changing it's Art - Button Positions to 0,-11 in the Object Editor. Anyway, last I used those Hide/Disable functions they worked, but that may have been a patch ago.
A hidden ability cannot be used directly (hotkey/selection), so it sounds like it's working. However, a hidden ability can still be used through triggered Orders.I tried this. It hides the ability and disables it.