Okay, I’m trying to make my first game, however the enemies only die some of the time. It’s weird though, because the main laser always works, but the turret fire only works once in a while. The file’s really messy, so I’ve uploaded both the .fla and the .swf. If you have any questions I’ll try to answer them.
fla: http://www.xcvtech.com/school/view/A9-TurboDefender.fla
swf: http://www.xcvtech.com/school/view/A9-TurboDefender.swf
shift shoots turret, space is laser(wait for it to recharge).
wasd control (w up, a left, s down, d right)
mouse up/down aims turret
onEnterFrame = function () {
_x -= 8;
if (_x<0) {
this.removeMovieClip();
_root.spawn.spawn1.ships1--;
}
if (_root.ship.bigLaser.hitTest(_x, _y)) {
this.hul -= 50;
}
for (i=1; i<_root.missile.laserCounter; i++) {
if (_root["laser"+i].hitTest(this)) {
this.hul -= 25;
_root["laser"+i].removeMovieClip();
}
}
if (this.hul<=0) {
this.gotoAndPlay(10);
}
myHull = this.hul;
};
Enemie’s main code