I have it so that when my characters punching MC hits the enemy, it plays the dying sequence and at the end of the dying sequence I have this.removeMovieClip(); but I have this code on the enemy MC:
onClipEvent (enterFrame) {
if (this._x > _root.player._x + 25) {
this._x -= 1;
_root.bad.play();
setProperty(this,_xscale, +45);
} else if (this._x < _root.player._x - 25) {
this._x += 1;
_root.bad.play();
setProperty(this,_xscale, -45);
} else {
_root.townsman.townsman_attack.play();
}
}
onClipEvent (enterFrame) {
if (this._y > _root.player._y) {
this._y -= 0.5;
_root.townsman.play();
} else if (this._y < _root.player._y) {
this._y += 0.5;
_root.townsman.play();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.player.punch.hit)) {
_root.townsman.gotoAndPlay(18);
}
}
I think the problem is that when the enemy is done dying, it's calling to the part that says } else { _root.townsman.townsman_attack.play(); and it's just going back to the attacking sequence. Is there a way to make him stay dead?