i’ve created a game by going through a set of tutorials on flashkit.com but that game is too simple. i’m trying to make the enemies shoot back at me but everything i have tried has failed. if anyone can help me, please do.
Well, my only problem is that i can’t make my enemies fire at me. i want to keep it horizontal, but i can’t figure out how to make them shoot.
If you downloaded the fla, you’ll see the green enemy ship(instance name - enemythree) and two different lasers (instance names - enemylaserone and enemylasertwo) These are the three objects that contain the scripts you need to be concerned with. The script on the enemythree ship makes the plane fly how it needs to and also duplicates the laser instances to make sure that they don’t just fire once, but continuously. The speed of the duplicated lasers are controlled in the actionscript on the ship, but the initial speed is set in the actionscript on the lasers themselves, along with the getProperty that gets the _x and _y values of the ship and then the setProperty which sets the laser to the match the ships values. Have a look at these three instances and I’m sure you’ll be able to figure it out. Let me know if you need more explanation.
Adam