whitegriffin
01-23-2002, 04:25 AM
hey all im sure most of u forums leaders have read posts on my game and i have run ino yet another porblem i have enemys and u shoot them k on hit they go and play a movie clip to show that they die (like blood) but if u shot them again when there playing the mc the replay the mc again heres my script for the bullet:
onClipEvent (load) {
_root.mysound2 = new Sound();
_root.mysound2.attachSound("die");
laserMoveSpeed = 50;
this._x = _root.spaceship._x+32;
this._y = _root.spaceship._y-70;
}
onClipEvent (enterFrame) {
if (this._name<>"laser") {
this._x += laserMoveSpeed;
if (this._x>600) {
_root.spaceship.laserCounter--;
this.removeMovieClip();
}
for (i=1; i<=_root.numEnemy; i++) {
if (this.hitTest(_root["enemy"+i])) {
_root.mySound2.start();
_root.score += 100;
_root["enemy"+i].gotoAndPlay(2);
_root.spaceship.laserCounter--;
this.removeMovieClip();
}
}
}
}
thanks
(the code got messed up with copy and paste )
onClipEvent (load) {
_root.mysound2 = new Sound();
_root.mysound2.attachSound("die");
laserMoveSpeed = 50;
this._x = _root.spaceship._x+32;
this._y = _root.spaceship._y-70;
}
onClipEvent (enterFrame) {
if (this._name<>"laser") {
this._x += laserMoveSpeed;
if (this._x>600) {
_root.spaceship.laserCounter--;
this.removeMovieClip();
}
for (i=1; i<=_root.numEnemy; i++) {
if (this.hitTest(_root["enemy"+i])) {
_root.mySound2.start();
_root.score += 100;
_root["enemy"+i].gotoAndPlay(2);
_root.spaceship.laserCounter--;
this.removeMovieClip();
}
}
}
}
thanks
(the code got messed up with copy and paste )