# Flex (or anyone else good at games)

**URL:** <https://forum.kirupa.com/t/flex-or-anyone-else-good-at-games/6670>\
**Category:** Uncategorized\
**Created:** [October 13, 2002, 10:20pm UTC](https://forum.kirupa.com/t/flex-or-anyone-else-good-at-games/6670 "2002-10-13T22:20:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scootman](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@Scootman](https://forum.kirupa.com/u/Scootman)\
**Post date:** [October 13, 2002, 10:20pm UTC](https://forum.kirupa.com/t/flex-or-anyone-else-good-at-games/6670/1 "2002-10-13T22:20:35Z")

</div>

umm im makin a game… and i want to be able to delay the weapon even if the button is held down… like in this…

[http://flex.funkyolive.com/test/newgamedemo.html](http://flex.funkyolive.com/test/newgamedemo.html)

how would i go about doing that?.. the only reason is cuz right now my game lags so bad if i just hold dow the button cuz so many movie clips on the screen at once…

thanks to anyone who can help…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 14, 2002, 6:53am UTC](https://forum.kirupa.com/t/flex-or-anyone-else-good-at-games/6670/2 "2002-10-14T06:53:04Z")

</div>

I didn’t understand what you were trying to do 🙂

And by the way, where’s Flex? Long time we’ve not seen him…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 15, 2002, 12:28am UTC](https://forum.kirupa.com/t/flex-or-anyone-else-good-at-games/6670/3 "2002-10-15T00:28:36Z")

</div>

ok… notice when you hold down the space bar… the bullets dont keep continuously fireing… thats what i want to do… in my game if i hold it down… it keeps going in a continuous stream… how can i put a delay between the shots… without having to tap the space bar…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 15, 2002, 3:46am UTC](https://forum.kirupa.com/t/flex-or-anyone-else-good-at-games/6670/4 "2002-10-15T03:46:47Z")

</div>

haha wow i seem to solve all my own problems dont i? i got it… what i did was on load i set a variable to 3… and on enterframe i decremented it… if it = -1 i set it to 3… and i had an if statement saying if it was 3 then i could shoot… therefore delaying the bullet =) now the only problem is if they tap the space bar instead of hold it down… it doesnt fire sometimes… i tried puttin a button with a on(keyPress) thing… but that messed up the if(key.isdown) thing… so i just dropped the keyPress part for now… but if you can come up with somthin just to fine tune my game… that would be great

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 15, 2002, 5:39am UTC](https://forum.kirupa.com/t/flex-or-anyone-else-good-at-games/6670/5 "2002-10-15T05:39:33Z")

</div>

You can try to reset the counter when the user presses the space bar.

pom :cowboy:
