# One-at-a-time

**URL:** <https://forum.kirupa.com/t/one-at-a-time/190559>\
**Category:** Uncategorized\
**Created:** [June 12, 2006, 10:57pm UTC](https://forum.kirupa.com/t/one-at-a-time/190559 "2006-06-12T22:57:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kpxnamja](https://avatars.discourse-cdn.com/v4/letter/k/7c8e57/32.png) [@kpxnamja](https://forum.kirupa.com/u/kpxnamja)\
**Post date:** [June 12, 2006, 10:57pm UTC](https://forum.kirupa.com/t/one-at-a-time/190559/1 "2006-06-12T22:57:30Z")

</div>

hello, here’s my problem: I have a faux animation of a red square which appears to have a slight resemblance of a human (2 eyes and one mouth), and is holding a rectangular bat. I’m trying to make it swing- once. The thing is, everytime the gamer presses the left mouse button the square swings. So if a gamer presses the left moust rapidly, it is doing a rapid fire swing- cheaters.

So here’s what I tried: I tried to create a boolean, if idle = true, then one could swing, if not, cannot.

Here’s the source file:
