Hey NGrounders!
Ive got this code from Denvishes tutorial about mousy shooting, well one problem, i cant shoot exacly from where i want, can someone help me out?
danka!
onMouseDown = function () {
bc++;
if (bc>1100) {
bc = 1000;
}
duplicateMovieClip("bullet", "b"+bc, bc);
with (_root["b"+bc]) {
spd = 20;
_x = gun._x;
_y = gun._y;
_rotation = _root.gun._rotation;
_root. pussfuck = true;
_root. bumfuck = false;
}
_root["b"+bc].onEnterFrame = function() {
with (this) {
if (_rotation>180) {
_y += (spd*Math.cos(Math.PI/180*_rotation));
_x -= (spd*Math.sin(Math.PI/180*_rotation));
} else {
_y -= (spd*Math.cos(Math.PI/180*_rotation));
_x += (spd*Math.sin(Math.PI/180*_rotation));
}
if (_x>Stage.width || _x<0 || _y<0 || _y>Stage.height) {
this.removeMovieClip();
}
}
};
};