[Solved] Hiding the "Get User" ability from Shops WHILE retaining it's functionality

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 72
Joined
Aug 10, 2018
Messages
7,640
I know that you can toggle the Get User button on and off in the editor with Select Hero's "Show Select User Button" field, but that won't fix my problem.

The problem is that the Get User button is taking up a slot on my commandcard and replacing Items inside the shop. I already have 2-3 required abilities inside of my Shop (Next Page, Prev Page, Main Menu), so i'm trying to avoid having another if possible.

I'm wondering if I can mimic the Get User ability through triggers?
I've already taken a swing at it with this:
  • Custom script: call IssueNeutralTargetOrderById( udg_tempPlayer, udg_tempUnit, 852566 , udg_CurrentShopUser)
Unfortunately, this only works if "Show Select User Button" is set to True which defeats the whole purpose of using it.


EDIT, SOLVED:
You have to change this inside the neutralabilityfunc.txt file.
// neutral interact
[Anei]
Art=ReplaceableTextures\CommandButtons\BTNSelectUnit.blp
Buttonpos=0,-11

Check my comment below to learn more.
 
Last edited:

Uncle

Warcraft Moderator
Level 72
Joined
Aug 10, 2018
Messages
7,640
Dang. How about setting its coordinates to -11? (Can't remember if that's for X or Y though), it should be hidden from the command card, at least if you don't have other abilities at this location

No luck, you can't actually access the Get User button as far as I know, so hiding Select Hero doesn't really do anything and it's hidden already anyway.
 

Uncle

Warcraft Moderator
Level 72
Joined
Aug 10, 2018
Messages
7,640
That seems like my best and only option, but I don't understand. How do I hide Abilities besides the main Move, Attack. Stop, etc...

Is there another CommandFunc file? The tutorials say you can hide any button, but i'm not sure where to find these other buttons. I guess they mean in the Object Editor by setting the button pos to 0, -11. Unfortunately, Get User is hidden from the Object Editor.

Anyone know if there's a file that contains it?
 
That seems like my best and only option, but I don't understand. How do I hide Abilities besides the main Move, Attack. Stop, etc...

Is there another CommandFunc file? The tutorials say you can hide any button, but i'm not sure where to find these other buttons. I guess they mean in the Object Editor by setting the button pos to 0, -11. Unfortunately, Get User is hidden from the Object Editor.

Anyone know if there's a file that contains it?
It may be in the CommandFunc.txt text file. I can't check right now, but I believe other hidden object editor data like build button positions are there too.
 

Uncle

Warcraft Moderator
Level 72
Joined
Aug 10, 2018
Messages
7,640
Found it! It was inside the neutralabilityfunc.txt file.

For anyone that wants to hide the Get User button, set the button position in the neutralabilityfunc.txt file to 0,-11.
It is listed as (I already changed the buttonpos to 0,-11):

// neutral interact
[Anei]
Art=ReplaceableTextures\CommandButtons\BTNSelectUnit.blp
Buttonpos=0,-11


I attached the file below with these settings applied. Simply import it into your map and set it's import path to "Units\neutralabilityfunc.txt"
and you're good to go.
 

Attachments

  • neutralabilityfunc.txt
    62.3 KB · Views: 77
Status
Not open for further replies.
Top