How do I go about this? Obviously "hide ability" won't work because it's not in itself an ability. I tried setting up a requirement for the behavior to "show" but this only grays out the button instead of removing it entirely.
Well, the simplest way I know of is setting up a requirement for the button and use triggers to fulfill the requirement (or not). I would probably use a requirement checking for a behavior on the unit and add or remove that behavior via trigger as needed.
How do I go about this? Obviously "hide ability" won't work because it's not in itself an ability. I tried setting up a requirement for the behavior to "show" but this only grays out the button instead of removing it entirely.
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
You need to go to the behavior itself and edit the requirements there under "Show". Not the passive at the command card
@onslaughtbear: Go
Do I need to create a 'requirement' first ?
I would want to hide the button by triggers without considering requirements, can I ?
I do not think you can. Not 100% sure, though.
Ok.. then what would be the simplier way ?
I just want to do WC3's 'Remove Ability' trigger equivalent.
This button is just to give a text, it should do nothing, it shouldn't be clickable, I just want to hide it when I want.
Well, the simplest way I know of is setting up a requirement for the button and use triggers to fulfill the requirement (or not). I would probably use a requirement checking for a behavior on the unit and add or remove that behavior via trigger as needed.
I don't find what trigger to use, this requirement should be unit specific and shouldn't apply to the whole player.
@Danicela: Go
Ok I've done it.
I've created a requirement as 'Show - CountBehavior(<Name of Behavior>,CompleteOnlyAtUnit))' and with 'Can be deleted - Show'.
When I set the button to the command panel, when I select the behavior, I choose my requirement.
When I add/remove the behavior by trigger, the behavior is correctly shown/hidden.