A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [Disc] bullet go to mouse/mc

  1. #1
    Senior Member
    Join Date
    Jul 2001
    Posts
    354

    [Disc] bullet go to mouse/mc

    I am finaly working on my first game in flash. Doing the old missle command type game. The part I am having problems with thoe is figuring out how to get the bullet from my base to go to my mouse positin when I fire. What I have done is made the mouse into a crosshair, when you left click the mouse button it leaves a duplicate mc of the crosshair in place so you can put sevral out at a time. now lets say I press my left mouse button and place a mc on the stage then I press the "A" button to fire from my left base. How would I get the bullet to travel to the crosshair mc for a hittest? And yes before I am flamed here. I have spent the last 2 days going through tutorials, looking through the search here and in google. Beleave me, I have looked high and low.

    Robert

  2. #2
    SaphuA_tmp
    Guest

    :)

    You'll only get flamed if there's a reason... don't worry

    But I don't understand your questions though ...
    Do you shoot your bullets from a gun at the left of the screen, and it should aim at the mouse?

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Posts
    354
    you have three bases at the bottom of the screan, one left, one middle and one right side. the "A" key fires the left base, "S" fires middle base "D" fires the right base. witch ever button is click that base will have a movie clip of a bullet that will need to travel to the mc of the crosshair that was placed by the mouse. HMMM about as clear as mud I think. wish I could explain it better. I would upload my swf but I am having problems with being able to ftp for some reason.

  4. #4
    Amiga freak Ironclaw's Avatar
    Join Date
    Jan 2001
    Location
    Sweden
    Posts
    1,650
    If the swf is small you can attach it instead.

  5. #5
    Illuminatus! fospher.com's Avatar
    Join Date
    Jan 2002
    Location
    5th Dimension
    Posts
    2,185
    Oh gee man - you'll need some trigs for this one. Math isnt my strong point - but I will point you in the right direction.

    Not exactly sure to what you're looking for - but try this method .

    edit: here's the fla

    Yours,
    Fospher

  6. #6
    Senior Member
    Join Date
    Jul 2001
    Posts
    354
    ok, here is the fla so far, I am using a little ufo to move around and drop bombs so I could make sure I had the effect I wanted on the buldings and such. the control keys are as fallows....A S D control the bases(the problem area for now.) The space bar puts up a temp sheild. the arrow keys move the ufo around the Ctrl key drops bombs and the mouse and left button places the cross hairs.
    Attached Files Attached Files

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