-
Laser Shots [HELP]
Good morning, good afternoon and good evening.
i am developing a platform game, but I currently faced the problem of laser shots being fired in the direction of the mouse.
Is there any way of getting the mouse angle and duplicate the clip?
My laser mc is made by a tween inside movieclip. with the laser starting at CenterCrosshair, and ending 800 pixles to the right. with the AS (stop();)
there are no GUN movieclips. the laser should be originated at the character alone (character is a blob).
so does anyone know how to duplicate MCs to mouse angles? and to get the mouse angle from the blob at least??
The blob will be moving.. so how does the mouse-angle detection work?
Regards,
TONGXN
-
this is the AS i'm usin:
onClipEvent (enterFrame) {
if (Key.isDown(Key.SPACE)) {
duplicateMovieClip("laser", laser1, 1);
_root.laser1._y = _root.hero._y;
_root.laser1._x = _root.hero._x;
}
if (_root.laser1.hitTest(ufo, true)) {
removeMovieClip(ufo);
}
}
mmm i exported laser..
what's wrong?
-
-
:(
why no one helpin me...