A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Sniper Game doesnt let enemies die =(

  1. #1
    Junior Member
    Join Date
    Oct 2000
    Posts
    7
    Hey everyone!

    I'm making a really cool sniper game, its got real-time zoom and everything! Anyways, I'm having a major problem. Whenever you shoot an enemy, he dies, but only if your looking through the scope. When its "unzoomed", the emeny remains unharmed. Lemme explain the game's guts a little.

    The scope is one MC. Inside it has the reticles and everything. This MC is on the main stage on top of the background MC, which is where all the action goes on. Inside the scope is another instance of the background MC zoomed 300%. The scope MC has masks and everything. I don't wanna tell exactly how I made it zoom cuz it took a LONG time and I'm proud . All the enemies are in a MC with an enemy in a different position each frame. When you shoot an enemy, it tells the ENEMY MC to go to the next frame, which SHOULD remove the ememy and place a new one in a new location. But it doesn't .

    If ANYONE could help, I'd be more than happy to credit you in the game.

    If you'd like to see the actual game, go here:
    http://www.cryptosonic.com/sniper.html

    Later guys, thanks in advance!

    BTW, I'm unfortunately using Flash 4

  2. #2
    Patron Saint of Beatings WilloughbyJackson's Avatar
    Join Date
    Nov 2000
    Location
    Ro-cha-cha-cha, New York
    Posts
    1,988
    I'm just learning myself, but one thing I found out last night is the Movie Clips don't read variable between levels... (or at least mine aren't)...

    Another thing could be that you're telling on MCENEMY to disappear but not the other one...

    If I'm correct, your scene is arranged like this...

    MAINMC\
    BACKGROUNDMCZOOMOUT---------MCENEMYZOOMOUT
    \
    MCZOOMINCLOSE
    \
    MCENEMY

    And you're telling MCEMEMY to disappear, but are you telling the other one to disappear?

    For me... I've been do something like this...

    If BUTTON IS PUSHED, Set Property ("MCENEMY", visiblity) = False
    and Set Property ("/MAINMC/BACKGROUNDMCZOOMOUT/MCENEMYZOOMOUT", visiblity) = False

    Just a guess...Anyone else have any theories?

    -pXw

  3. #3
    Junior Member
    Join Date
    Oct 2000
    Posts
    7
    Your half right. Here is my setup:

    Main Stage
    --Layer 1
    -----Scope
    -------Layers 1-5 are masks
    -------Layer 6 is ENEMYBG
    --Layer 2
    ----ENEMYBG

    Confusing? Probably. This is really starting to annoy me.

    By the way, how did you like the zoom?

  4. #4
    Patron Saint of Beatings WilloughbyJackson's Avatar
    Join Date
    Nov 2000
    Location
    Ro-cha-cha-cha, New York
    Posts
    1,988
    The Zoom effct is pretty damn cool...

    Did you play around with the visiblity thing for the Second Enemy layer? By the looks of it, all you would need to do is "/NAME-OF-ENEMY-LAYER2-MOVIE" it away...

    -pXw

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