Yo!
Since I'm waiting to finish my code, for some strange reason, my Mini bosses are not working and I have no clue on the code right now, I'm finishing my assests and placing them into the final game.
I've fixed a problem with my enemies thanks to Steve. We found the problem was the kill function. Inside the kill function I had used the same code aqbout twice, it written:
function kill()
{
var explosion = new Explosion();
stage.addchild(explosion);
explosion.x= this.x;
explosion.y=this.y;
shootTimer.stop();
shootTimer.removeEventListener("timer", shoot);
removeEventListener("enterFrame", enterFrame);
stage.removeChild(this);
for(var i in list)
{
if (list[i] == this)
{
delete list[i];
}
}
if Game.ship.visible==false)
{
kill();
}
This last be for the for (var i in list) has already been written in the Game code, after commenting it out, the error had disappeared, and I think this is the same in the mini boss, as the shooturial had told me to copy the code from the enemy ships. I also need to look at the hit test for the mini boss and boss, as my bullets don't hit the mini bosses.
I'm still looking into the mini bosses, I have to look at the hitTest, but I'm still having trouble, and I've changed the health pack. As I've changed many elements in my game, I've changed the range of fire from 600 pixels to 400 pixels, meaning the enemies have to be closer in order to shoot, and I'be also changed the shoot limitor from 8 to 15, slowing the firering rate, making the player have less time to shoot and less range, because of these elements, it became very hard to survive, so I've sped up the health pack, giving the player more of a chance to fight the mini boss, who is still not getting him. I've found the problem to the mini boss all by myself! I reread the shooturial and found I didn't write EnemyShip.list.push(this); I only write list.push(this);. Now that I have written EnemyShip, he does get killed, but only one comes on and he only takes one hit to kill, and his health bar comes on when he is hit, and stays on after he is dead. My mini boss now be attack and now doesn't get killed in one go, but takes alot of shoots to kill, but now the player dies before killing the mini boss, and he still doesn't disappear when the player dies, he carry on running and stays off screen while the player starts a new game.