PDA

View Full Version : flex (or anyone else good at games)



Scootman
October 13th, 2002, 06:20 PM
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...

pom
October 14th, 2002, 02:53 AM
I didn't understand what you were trying to do :)

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

Scootman
October 14th, 2002, 08:28 PM
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...

Scootman
October 14th, 2002, 11:46 PM
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

pom
October 15th, 2002, 01:39 AM
You can try to reset the counter when the user presses the space bar.

pom :cowboy: