A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Laser Shots [HELP]

  1. #1
    XRave tongxn's Avatar
    Join Date
    Apr 2005
    Location
    Somewhere near Here
    Posts
    870

    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
    When you actually know what "OMG I have so much homework!" means, you won't want to be me.
    Xrave

  2. #2
    XRave tongxn's Avatar
    Join Date
    Apr 2005
    Location
    Somewhere near Here
    Posts
    870
    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?
    When you actually know what "OMG I have so much homework!" means, you won't want to be me.
    Xrave

  3. #3
    XRave tongxn's Avatar
    Join Date
    Apr 2005
    Location
    Somewhere near Here
    Posts
    870
    ?!?
    When you actually know what "OMG I have so much homework!" means, you won't want to be me.
    Xrave

  4. #4
    XRave tongxn's Avatar
    Join Date
    Apr 2005
    Location
    Somewhere near Here
    Posts
    870


    why no one helpin me...
    When you actually know what "OMG I have so much homework!" means, you won't want to be me.
    Xrave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center