• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Hide the 'build menu' ability button (while retaining functionality)

Status
Not open for further replies.
Level 10
Joined
Apr 27, 2012
Messages
235
Hello!
I want the button that opens the build menu to be hidden.
I tried 3 methods, but they all failed:

  1. Editing "units/CommandFunc.txt" so that the Build Button's Position is 0,-11. The build button's position remained unchanged ingame. I tested the 0,-11 value for other buttons like move, and it worked for them, but not for the 'build' button.
  2. Using custom script "call UnitRemoveAbilityBJ( 'ANbu', GetTriggerUnit() )". This removed the icon, but it also removed the functionality and the unit can no longer build when ordered through some other triggers.
  3. Using custom script "call BlzUnitHideAbility( GetTriggerUnit(), 'ANbu', true )". I have never used that script before, but it got automatically disabled when testing the map. I use an older version of WC3. Is this a newer script that was added through more recent updates?

The topic is discussed in other threads, but there is no proper solution yet.
 
Last edited:
Level 14
Joined
Jan 16, 2009
Messages
716
The build abilities are actually defined for each race in their [...]abilityfunc.txt. So for undead it would be in UndeadAbilityFunc.txt while for human it would be in HumanAbilityFunc.txt.
For undead, the definition looks like that:
Code:
// Undead Build
[AUbu]
Buttonpos=0,2
Order=undeadbuild
 
Level 10
Joined
Apr 27, 2012
Messages
235
The build abilities are actually defined for each race in their [...]abilityfunc.txt. So for undead it would be in UndeadAbilityFunc.txt while for human it would be in HumanAbilityFunc.txt.
For undead, the definition looks like that:
Code:
// Undead Build
[AUbu]
Buttonpos=0,2
Order=undeadbuild
Okay, it worked. But I could not find the "Undead Build" code block you posted anywhere in the "UndeadAbilityFunc.txt" file. I had to insert it by myself. So I did, and it worked ingame, though it turned the Gather Icon of the Acylote in the test map into the SAMMY! icon...

Couldn't the solution 2 you mentioned work just fine if you just add the ability back to the unit when such trigger is called?
I think I already tested this (?). If I recall correctly, the unit stopped on its way to the building location as soon as the ability was removed again.
 
Status
Not open for further replies.
Top