I have this code in my bullet MC
onClipEvent(enterFrame) {
speed = 20
if (_root.char._currentFrame == 1) {
this._x += speed;
this.gotoAndStop(1)
} else {
this._x -= speed;
this.gotoAndStop(2)
}
if (this._x >= 800) {
removeMovieClip(this);
duplicateMovieClip(this,"bullet",3);
this._x = _root.char._x;
this._y = _root.char._y;
} else if (this._x <= -800) {
removeMovieClip(this);
duplicateMovieClip(this,"bullet",3);
this._x = _root.char._x;
this._y = _root.char._y;
} else {
this.play();
}
}
I made it to the point where the character shoots but when ever it looks left or right the bullet will change direction, how can I have the bullet go one way without it changing direction when the character looks left or right? little help