A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: detecting the depth of a MC

  1. #1
    DOT-INVADER marmotte's Avatar
    Join Date
    May 2002
    Location
    Dot-Switzerland
    Posts
    2,601
    i'm still improving my fight game, here's what i have so far:

    - new combo system, this time it's working VERY well, and allows hadoken-like moves, and of course more complicated ones...
    - because of that, several attacks combinations were added for the main character.
    - ability to throw your opponent in the air added (go in front of him, then forward+medium punch)
    - scrolling with depth
    - reinhiercash provided me a complete set of vegeta (dbz) sprites (thanks ^^). i'll add characters when i'll judge the gameplay good enough.

    now, i want to know something:
    i looked carefully while playing fight games, sometimes the characters are swaping depth (especially during attacks, or other special actions). i'm trying to reproduce that in my game.. it works, but... well, is there a way to detect the depth of an MC without using the getDepth command, which is flash player 6 only compatible?
    because i don't want the character to swap each time he performs a special attacks, but just when he is backward from the opponent.
    thanks.

    btw, i'll post the new version of my game soon.


  2. #2
    Gross Pecululatarian Ed Mack's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    2,954
    I don't think so, so just set a variable whenever you change the depth or somthing, and use that.

  3. #3
    w00t PrED32's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    529
    The best way I found is to have a depth variable on the clips... that just corresponds to the depth that you attach them on.. then when you swap the depth's you swap those variables too... It works in flash5, but it means each clip has another variable and you have to do two actions to swap instead of one... But it works..

    Hehe, I think thats what Ed said.. but I cant tell.

  4. #4
    DOT-INVADER marmotte's Avatar
    Join Date
    May 2002
    Location
    Dot-Switzerland
    Posts
    2,601
    ok, thanks. that's what i had in mind, but wasn't sure of another way.

    see you later.

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