disable and enable buttons mid game

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
exactly what the title, says, there appears to be no way to enable/disable buttons via the trigger editor unless its just disable ability, and requirements apparently can not be used to show/hide a button, which i thought was a possibility, but apparently wont work. It seems to be that buttons are hard coded into the system.
 

Dave312

Censored for your safe viewing
Reaction score
269
Requirements can be used to show/hide an ability. To do this, the requirements must be placed under the Show folder in the Requirements + property on the requirement.

You can also use triggers to show/hide buttons mid game by using the Allow/Disallow Ability For Player action.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
ok so that does remove the ability? also how do you make the button for a passive behavior ability not clickable, and thanks btw
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
i figured out requirements for abilities to be hidden, it should be in the ability: requirements field, a custom requirement, that should look like the following:
Trigger:
  • Requirement Name
    • Use:
      • Greater than or equal to
        • count Behavior.CompletedAtUnit
        • Constant: 0
    • Show:
      • Greater than or equal to
        • count Behavior.CompletedAtUnit
        • Constant: 0


passive buttons are simply not hide-able unfortunately
Therefore, to simulate a passive i created an instant effect ability with no cooldown or cost and created a requirement that the behavior for the ability is on the unit, allowing it to simulate a passive with a normal button.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
I'm quite sure you don't need the requirement nodes in the use category. You only need to put it in Show category. If it's not shown, it's not usable.

You can easily hide passive buttons with requirements. You specify the requirement in the command card. So it looks like:
Code:
Command Type: Passive
Requirements: YourRequirement
Behavior: Whatever
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
Ya i understand how they work, im actually quite adept with requirements now, but the issue is that show requirements simply dont work on passive buttons. They do nothing, use requirements on the other hand work perfectly. The show requirements are made for actuall abilities.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top