• 🏆 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] Hide Build Ability Button

Status
Not open for further replies.
Level 13
Joined
Nov 4, 2006
Messages
1,239
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 29
Joined
Feb 18, 2014
Messages
3,583
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