# Stop user from spamming a button

**URL:** <https://forum.kirupa.com/t/stop-user-from-spamming-a-button/313242>\
**Category:** Uncategorized\
**Created:** [August 24, 2010, 8:34pm UTC](https://forum.kirupa.com/t/stop-user-from-spamming-a-button/313242 "2010-08-24T20:34:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![screeg](https://avatars.discourse-cdn.com/v4/letter/s/ccd318/32.png) [@screeg](https://forum.kirupa.com/u/screeg)\
**Post date:** [August 24, 2010, 8:34pm UTC](https://forum.kirupa.com/t/stop-user-from-spamming-a-button/313242/1 "2010-08-24T20:34:42Z")

</div>

I have a little turn-based combat app where I use a Timer so enemy units can attack in sequence, and to allow time for animations to play. Works great for them. But if the user hits the attack button too rapidly, friendly units miss there turn.

I tried inserting a toggling Boolean var and saying “It’s not your turn!” when you click to attack. That works, there is indeed a text prompt, but friendly units still miss turns.

Any techniques to address this welcome, especially if they don’t involve a Timer. Or if you can point me to a thread. I tried searching for button and click, but with no luck.
