I wondering how, (don't tell me its easy, I know, but I don't know how.) to make the char go to the next level when he defeats 20 enemies. All I want the 'next level' to be is more enemies. No need to tell the player anything.
Heres the FLA file: http://www.mediafire.com/?kcjym4yjmyt
Make some counter to keep tally of the enemies the char defeats and when it equals 20 it does something like goes to the next frame with a different background and spawn more or different enemies.
Make some counter to keep tally of the enemies the char defeats and when it equals 20 it does something like goes to the next frame with a different background and spawn more or different enemies.
It's as simple as that. If you understand how the game was programmed it should be a piece of cake.
if(hitTestObject(bulletTarget)){ //remove this from the stage if it touches a bullet removeEventListener(Event.ENTER_FRAME, eFrame); _root.removeChild(this); counter += 1; <-- ADDED THIS _root.bulletContainer.removeChild(bulletTarget); bulletTarget.removeListeners(); _root.score += 10; }
Put a dynamic textbox for Counter visible on the screen and visually debug it. If the number doesn't go up when you hit an enemy there is something wrong in the code and more trial and error must take place.
1. How to you make a dynamic textbox? 2. How to you make it so the speed of the bullet is the score / 2.5? I have private var speed:int = 3; and the var for the score is _root.score. 3. How to you make a object move according to the mouse?
When you're in Flash and choose the text tool, there's a drop-down box that says "static" on it. Click on that, then click on "dynamic." Then make a text box. It's now dynamic text, instead of the default static.