The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 6 of 6

Thread: Changing depths - when I kill a zombie it's blood splatter is above other zombies

  1. #1

    Changing depths - when I kill a zombie it's blood splatter is above other zombies

    Hello

    In my game (you can see it here) when I kill a zombie It turns into a blood splatter and sometimes another zombie walks over the blood splatter and it appears that it is under the blood splatter. What I would like to do is when zombie is killed have it be the lowest depth. It can't swap depths with the lowest one because as soon as the next zombie is killed it will swap depths and the first one won't be below all of them anymore. That's kind of confusing, but if you look at it via the link above you'll see what I mean.

    Just kill a zombie and wait for another zombie to walk over the blood splatter. Sometimes the other zombie will be above it and sometimes it won't.

    Controls:
    The ship will follow the mouse
    Click anywhere and hold to activate the giant saw blade of death

    Thanks!

    Also, if you have any comments on what I have so far they're more then welcome!

  2. #2
    There are quite a bit solutions to this, but here is mine: Try making two movie clips, one that displays the baddies and giant blade, and the other being the blood movie clip. So from what I can see, you would have the background be on the bottom, then the blood, then the baddies, and finally the blade. Again, it might work for you, but this is how I would approach it.
    Blog: http://www.gregathons.com

    Why do web browsers function so differently? Why can't they all follow the same Web Standard...users don't care how it works, but the programmers do.

  3. #3
    hey there actually as long as you arent using tweens you can use swapDepths try using it like this:
    Code:
     
    _root.yourzombie.swapDepths(1);//1 would be the desired depth that you want.
    simple as that

  4. #4
    Simply attach the blood splatters on a level between the zombies and the vehicle. Or...

    var count:Number = 0;
    function makeBlood() {
    attachMovie("bloodsplatter", "bloodsplatter"+count, getNextHighestDepth(), {_x:curZombie._x, _y:curZombie._y});
    count++
    }


    But make sure your vehicle is at a few thousand depths above it.

  5. #5
    Ok you got a number of solutions here, but if you ask me....the best way is to create the blood, WITHIN the zombie mc.

    Code:
    attachMovie("blood","zombie_mc.blood_"+count,getNextHighestDepth());
    MY BLOG

    I need a SPRITER who can do pixel arts for an arcade fighter project. If you can help out, please pm me.
    I also need someone who can write simple xml files.


  6. #6
    Thanks for all the solutions! I'll play around with them when I get home tonight after work...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012