Flex (or anyone else good at games)

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

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…

I didn’t understand what you were trying to do :slight_smile:

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

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…

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

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

pom :cowboy: