yopug
07-30-2007, 01:18 PM
alright, well i have a mc titled 'char' that moves around with the arrow keys. When the space bar is pressed, a gunshot is fired from 'char'. I put this code on the bullet_mc:
onClipEvent(enterFrame){
if(Key.isDown(32)){
this._y = _root.char._y;
this._x = _root.char._x;
this.play();
}
}
However, the problem is, while the bullet is shot, if my character moves up or down, the bullet moves up or down as well. How do i keep it so the bullet goes straight?
onClipEvent(enterFrame){
if(Key.isDown(32)){
this._y = _root.char._y;
this._x = _root.char._x;
this.play();
}
}
However, the problem is, while the bullet is shot, if my character moves up or down, the bullet moves up or down as well. How do i keep it so the bullet goes straight?