Due to latency of course. If you don't know, you could achieve pressing a button 5 times due to latency before your Disable/Hide button trigger takes effect. How to prevent this?
Rollback Post to RevisionRollBack
Member since 2010. Made the -The Thing- [Revival] game. Nostalgic of the WC3 days.
Due to latency of course. If you don't know, you could achieve pressing a button 5 times due to latency before your Disable/Hide button trigger takes effect. How to prevent this?
You can set a variable once the button is pressed, and check that variable once it's clicked. So if the variable is set already, you know the button was already pressed.
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
Due to latency of course. If you don't know, you could achieve pressing a button 5 times due to latency before your Disable/Hide button trigger takes effect. How to prevent this?
Member since 2010. Made the -The Thing- [Revival] game. Nostalgic of the WC3 days.
Disable the button or hide the button. Check, if the button is enabled/visible whenever it was clicked before you execute the actions.
If you use enable/disable, you need to set that state to enabled after creating the button. Newly created dialog items are in an invalid state.
You can set a variable once the button is pressed, and check that variable once it's clicked. So if the variable is set already, you know the button was already pressed.
You could check to see how many active trigger threads are running for that trigger.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Yeah, so you create a boolean variable and set it to false by default, then go to your trigger and make these modifications...
Event: Dialog Item used
Condition: Boolean Variable = false
Action: Set Boolean Variable = true
Action: (Put your stuff here)
I didn't know the editor had a built-in enable/disable dialog item. Lol, damn. That worked. Thanks.
By the way, willu, I'll take care of converting the rest of the triggers into that built-in enable disable crap.
Member since 2010. Made the -The Thing- [Revival] game. Nostalgic of the WC3 days.
"Prevent players from pressing a button more than once"?
The first thing that came to mind when reading that is "Mission Impossible". We players really love our buttons.
@Mozared: Go
Goku's muffin button
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)