i know ive seen sample fla’s on here using this… but i cant seem to find one… so ill just post again…
im makin a space ship game… and i want to be able to move my plane and fire the lasers at the same time… but the way im doing it… flash is only allowing me to press one key at a time… i know there is a function like getKey.whatever or somthin… but that makes it continuously move one direction even if i let off the key… so i changed it… i tried to make it move with easing… that didnt work as well… its sort of a mess…
basically i have an extra button on the side of the stage to hold the code for pressing keys… since i dont know how to do it within movie clips… so in the button i have:
targx and targy are declared in the first frame of the main timeline so they can be initalized… and i attempted to make a function to move the ship… so in the frame the prototype is:
im expiramenting with new ways of doin stuff… i know functions and prototypes are good… but im still learnin how to use them… anyway… also my lasers work… but… with the limit of 10 on the levels it takes up… if i hold down the space bar they shoot so fast that they overlap… i know 10 lasers should be able to go across the screen… but they overlap and dont… is there a way to delay them so not so many are on the stage at once if i hold the button down?
ok… sorry for having made you read all that… i got the movement/lasers… i found a post by bauermeister about jumping… i found the multpile keys at once thing… so anyway… now its just a matter of collision detection between all the duplicated enemies/lasers… which im not sure how to check an enemy/laser that is duplicated… what would the name be?
umm haha seems i am smarter than i think… i think… :q:
anyway… i looked at flashkit (yes im sorry… i trusted a site other than kirupa)… but anyway… in their game tutorial i saw that i was putting a . in when i didnt need it… i was putting _root.[“enemy1”+i] instead of just _root[“enemy1”+i]… so now all is well…
sarcastically
WOW THANKS ALOT FOR YOUR HELP! YOU GUYS ARE SO FAST!
haha j/k…
while you are here though… i would like to put a small delay between shots fired… as to not make the game too easy by just holding down the space bar and moving up and down…
does it seem like im talking to myself here? lol… not really a question… but for some reason also my game is running extremely slow… all i have is the ship, 1 enemy ship, and a laser… i dont know why it is going so extremely slow… nothing else is running that slow… any ideas?