How can I prevent a button from being spammed?
Hey I hope everyone is doing well.
I have a UMG menu that plays an animation of the menu being lifted off the screen like a piece of paper when you exit the menu. My game is for android, and recently I added functionality for the android back button, when I realized my method to deal with the button being spammed or hit repeatedly while the animation played wasn't working. Below is my attempt.
And that bool 'hasBackBeenHit' is set to false on event construct. Is there a standard way I should deal with this that I'm unaware of? It's like the user is able to cause my animation to start over by spamming the button.
Thank you so much to anyone willing to take the time to help.
asked Jan 24 '19 at 05:53 AM in Blueprint Scripting
No, there no standard way to do it. If your menu widget is just hidden not destroyed, only thing you could do better is to have general menu state bool and set to false when dissaper animation is start playing and set to true when appearance animation finished and use that bool as a filter to any menu related events if needed, including back button.
Follow this question
Once you sign in you will be able to subscribe for any updates here