Forum Topic: Denvish's Game/Mouse Shoot!

(147 views • 0 replies)

This topic is 1 page long.

<< < > >>
Shouting

ApeLord

Reply To Post Reply & Quote

Posted at: 4/30/06 03:53 PM

ApeLord EVIL LEVEL 15

Sign-Up: 12/24/04

Posts: 1,562

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();
}
}
};
};


All times are Eastern Standard Time (GMT -5) | Current Time: 01:37 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!