• 🏆 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!

Event - Button pressed bug

Status
Not open for further replies.
Level 12
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 12
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,202
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