I need help. Using AS2, does anyone know how to aim and fire with a weapon such as a gun. Also, I have the aiming part settled, however when the gun is aiming to the right it is the right way round, but when the gun is aiming to the left it is upside down...
This is the code I used on the gun; and yes, it is going to be a madness game:
onClipEvent (enterFrame) {
myRadians = Math.atan2(_root._ymouse-this._y, _root._xmouse-this._x);
myDegrees = Math.round((myRadians*180/Math.PI));
_root.yChange = Math.round(_root._ymouse-this._y);
_root.xChange = Math.round(_root._xmouse-this._x);
_root.yMove = Math.round(_root.yChange/20);
_root.xMove = Math.round(_root.xChange/20);
this._rotation = myDegrees+90;
}
And for the firing of the gun, I need it so that it fires when I click the mouse...most appritiative if you could help me.
I am a goat, from the future, with tazor beams, and tuna; lots and lots of tuna...