• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Event - Button pressed bug

Status
Not open for further replies.
Level 13
Joined
Apr 15, 2008
Messages
1,063
This event fires every time player presses the button, even if he doesn't fulfill requirement (and therefore the button is greyed out). I don't know if it is a bug or intension, but I see no point in detecting failed button presses. Also, there seems to be no way of detecting whether the "press" was successful or not.

What I actually needed was to detect button press on "change command card" buttons, this seems to be the only way, or is there some other?
 
Level 13
Joined
Apr 15, 2008
Messages
1,063
Thanks, but that seems like a lot of work, considering I will need this same functionality for a couple of units, it would be a nightmare.
Unless... I have a couple of "basic" units that morph into the same set of secondary units, just without changing actor. The only problem would be how to morph back into the specific unit.

EDIT: I reported this bug, along with panels crash on battle.net forums, so there is a slight chance someone will notice it.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,286
You need to write your own validation check. If a button is disabled you can set a flag (boolean) and use a condition to make sure the button will not run anything.

You have to do this anyway as hackers can send button press orders at any time even if the button should not be pressable (but exists). A lot of SC2 maps suffer from this and is proved by how you can trigger a button multiple times by pressing fast (due to lag) even though the action makes the button dissapear from screen.
 
Status
Not open for further replies.
Top