A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Fighting game

  1. #1
    Junior Member
    Join Date
    Jun 2004
    Location
    Ipswich,MA
    Posts
    26

    Fighting game

    Hey does anyone know how to make a fightingame
    like one that is two player
    witha setup like these guys are setup




    and the 2 fight
    the time i had gas

  2. #2
    Senior Member
    Join Date
    May 2002
    Location
    Sioux Falls, SD
    Posts
    1,155
    sorry, but you arent going to get much help asking such a broad question. are there any parts of the game that you need specific help with?

  3. #3
    Junior Member
    Join Date
    Jun 2004
    Location
    Ipswich,MA
    Posts
    26
    well i pretty much need help with everything but the thing i really dont know is the hittest function
    the time i had gas

  4. #4
    Senior Member
    Join Date
    May 2002
    Location
    Sioux Falls, SD
    Posts
    1,155
    here is some code to help you with the hit testing

    code:

    onClipEvent (enterFrame) {
    if (hitTest(_root.otherGuy)) {
    gotoAndPlay ("hurt");
    _root.health -= 1;
    }
    }


  5. #5
    Optimist Prime StenFLASH's Avatar
    Join Date
    Mar 2004
    Location
    Canberra, Australia
    Posts
    252
    Joopson, are you trying to make a fighting game and an RPG at the same time? or are they related in some way? Could you tell me if these are your first attempts or if you've made something before?

    http://www.flashkit.com/board/showth...hreadid=565317

  6. #6
    Junior Member
    Join Date
    Jun 2004
    Location
    Ipswich,MA
    Posts
    26
    i am making it like this, your walking around like in an Rpg and when you go near an enemy it switches to fighting mode
    the time i had gas

  7. #7
    Senior Member
    Join Date
    May 2002
    Location
    Sioux Falls, SD
    Posts
    1,155
    ok, so to get your character walking

    put on character
    code:

    onClipEvent (enterFrame) {
    if (Key.isDown(Key.RIGHT)) {
    this._X += 3;
    }
    if (Key.isDown(Key.LEFT)) {
    this._X -= 3;
    }
    if (Key.isDown(Key.DOWN)) {
    this._y += 3;
    }
    if (Key.isDown(Key.UP)) {
    this._y -= 3;
    }
    }



    now to initialize fighting

    put on badguy
    code:

    onClipEvent (enterFrame) {
    if (hitTest(_root.hero)) {
    _root.gotoAndPlay("fight");
    }
    }



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