Variables and arrays?
Okay, I’ve got a bullet array, bullets are created when I click and pushed into the array to be hit tested against enemies. Now each time I click the old bullet disappears and a new one appears.
I’m GUESSING that my code is just moving the same bullet around and I’m guessing just pushing the same bullet into the array as it displays multiple bullets. How do I get this to create a new bullet each time?
public function fire(evt:MouseEvent){
for(var i:int; i<1; i++){
bulletArray.push(new Bullet());
var bul:Bullet = bulletArray*;
addChild(bul);
bul.locations(); //method that forces bullet to hit where clicked on screen.
}