Hi there. This is my first post and and it's an inquiry as to how to make enemies shoot bullets in AS2. I already have the main character shooting bullets, but for some reason can't get enemies to shoot them.

The enemies are all generated using arrays and so are the bullets. So each enemy and bullet is a copy of the same movie clip.

The problem is whenever there's more than ONE copy of the enemy on stage, the bullets only generate on that copy unless it's destroyed. Then they appear on the next copy, etc. etc.

Also the collision detection only works for some of the bullets.

I'm not great at programming, so all the code in my game is Frankensteined together from dead tutorial sites I've found online, and so I'm also hoping this is a simple thing to do.

TL;DR would really appreciate if someone could just throw me some code so my enemies can shoot projectiles at the character.