• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Question on disabling abilities

Status
Not open for further replies.
Level 3
Joined
Jul 25, 2014
Messages
31
Is there any way to disable an ability but not like the 'regular' GUI disable which removes an ability from your action bar, but in a way that Shadowmeld appears during the day? Like the icon and toolbar are there, only the ability is grayed out and unclickable?

(Yes, I know I can make another ability based on Moonglaive or something with DISBTN icon and same tooltips and change it with triggers, but is there a more effective way?)
 
By 'regular' GUI, do you mean
  • Disable (Ability) for (Player)
or are you talking about removing and adding an ability to a unit? Because the latter works pretty well for imitating disabling an ability. It's just that some abilities like Uproot tend to bug when you do that.

If you don't know how it works, make a dummy version of the ability that requires an specific upgrade to be usuable (you can duplicate the existing ability). To 'disable' the ability, you remove it via triggers and add the dummy version. To re-enable the ability, swap them back. The dummy version needs to have a tech requirement, and you can name that tech whatever you like. Eg: your ability can only be used while your unit is on blight, so you can name your tech 'Must be on blight' so that whenever you step off blight and swap out the ability for its disable counterpart, the disabled ability would read:

[Name of Ability]
- Must be on Blight

[Description]

This would also take care of the greying out for you without requiring a new icon.

EDIT: in re-reading your query, I think I basically just told you to do what you already knew. But imo this method works pretty well.
 
Level 25
Joined
May 11, 2007
Messages
4,650
Create a unit called "Must be day". Create a spell and set the tech requirement to be "Must be day"

For the player(s) who have the spell, create the dummy unit "Must be day".

Remove it at night, add it back at day.
 
Status
Not open for further replies.
Top