A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: [MX04] why is only one enemy shooting?

  1. #1
    Flash Incompetent ChaseNYC's Avatar
    Join Date
    Jun 2002
    Location
    new york city
    Posts
    693

    [RESOLVED] why is only one enemy shooting?

    im using Flash MX2004... attached is the fla, the code for enemy laser being shot is in the enemy movieclip on the main screen first frame... Yes i am temporarily using some images from a pixel art competition, just for my own sanity, i do not plan to steal them... if you have any questions as to why certain things are happening I will answer to the best of my ability.... Thanks in advance! Oh yea, why does only one of the enemies shoot? how would I fix it? and by how, code is welcome, but moreso explanation of where the coding is flawed and an explanation of how to fix it. Thanks again!

    -ChaseNYC

    p.s. i also notice that after a while only one enemy is left, i am not sure what is wrong with my loop that leads to there being only one enemy... not necessary at the moment but if you see any reason please inform me.
    Last edited by ChaseNYC; 06-27-2006 at 05:29 PM. Reason: resolved...
    mmm signature

  2. #2
    Flash Incompetent ChaseNYC's Avatar
    Join Date
    Jun 2002
    Location
    new york city
    Posts
    693
    any reason i'm not getting any responses?
    mmm signature

  3. #3
    Member
    Join Date
    May 2006
    Location
    Michigan
    Posts
    99
    I think not suer that your issue is that you have a timer on the laser... you may want to do a random with no timer

    why because when the timer triggers the fire it will not fire again while in the screen so on ship fires but the other can't until that function ends.

    not sure but could be there is a game like this on the Flash kit tutorials just verify how they did it there

    later mate
    Jay

    The man with the plan !!!

  4. #4
    Member
    Join Date
    May 2006
    Location
    Michigan
    Posts
    99

    response

    I think not sure that your issue is that you have a timer on the laser... you may want to do a random with no timer

    why because when the timer triggers the fire it will not fire again while in the screen so on ship fires but the other can't until that function ends.

    not sure but could be there is a game like this on the Flash kit tutorials just verify how they did it there

    later mate
    Jay

    The man with the plan !!!

  5. #5
    Flash Incompetent ChaseNYC's Avatar
    Join Date
    Jun 2002
    Location
    new york city
    Posts
    693
    ummm if i take out the timer then the enemy is constantly shooting bullets... how would i go about regulate how often a bullet was shot? took out time, also doesn't solve the problem... the tutorial i found doesn't have enemy bullets....
    mmm signature

  6. #6
    :
    Join Date
    Dec 2002
    Posts
    3,518

    Maybe something like this...?

    There are also problems with setting items to the same name and same depth.
    I posted a modified version for you to look at. I also moved the code off the ship and into the main timeline, easier to work with.

    HTH
    Last edited by dawsonk; 08-22-2007 at 10:52 AM.

  7. #7
    Flash Incompetent ChaseNYC's Avatar
    Join Date
    Jun 2002
    Location
    new york city
    Posts
    693
    thanks so much! i've been looking at it for a while and i'm starting to understand everything you did and what the problems were! appreciated greatly!
    mmm signature

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