• 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.

[General] Hide Build Ability Button

Status
Not open for further replies.
Level 14
Joined
Nov 4, 2006
Messages
1,241
Hello,

i have some units which, depending on what mode is selected in the beginning can build some towers.
Now in some cases they cannot build anything. I do this by simply setting the construction limit of the towers to 0.

That works, however now my units have a build button which opens an empty menu, which is kinda annoying.
Is there a way to hide this or can is use a different approach on limiting the construction which does not generate this problem?

What i do not want to do is create copies of all units with and without the building ability.

Any Ideas?
 
Level 11
Joined
Nov 23, 2013
Messages
665
Have you tried the action "Unit - Remove Ability from unit"?
Edit: nevermind, build ability is not a normal ability
 
Level 30
Joined
Feb 18, 2014
Messages
3,623
Have you tried the action "Unit - Remove Ability from unit"?
Edit: nevermind, build ability is not a normal ability
It is actually, but its hidden and only accessible in JASS via its rawcode which can be found in Units\AbilityData.slk.
  • Custom script: call UnitRemoveAbilityBJ( 'ANbu', udg_Worker )
or
  • Custom script: call BlzUnitHideAbility( udg_Worker, 'ANbu', true )
 
Status
Not open for further replies.
Top