# Prevent Flooding

**URL:** <https://forum.kirupa.com/t/prevent-flooding/215640>\
**Category:** programming\
**Created:** [February 8, 2007, 9:49pm UTC](https://forum.kirupa.com/t/prevent-flooding/215640 "2007-02-08T21:49:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tophat](https://avatars.discourse-cdn.com/v4/letter/t/e19adc/32.png) [@tophat](https://forum.kirupa.com/u/tophat)\
**Post date:** [February 8, 2007, 9:49pm UTC](https://forum.kirupa.com/t/prevent-flooding/215640/1 "2007-02-08T21:49:17Z")

</div>

I’m making a mario-like platform game, and when you press spacebar, it shoots fireballs. The only problem is, if you hold down spacebar, they just endlessly come out until you stop pressing it. Is there any way to control this?
