Melee attacks on game salad

RabittsfootgamesRabittsfootgames Member Posts: 0
edited February 2012 in Working with GS (Mac)
Okay, so Im making a platforming game, only I'm trying to make an actor able to punch and kick, its the only thing left for me to do before my game can be finished.


Thanks, Liam.

Comments

  • calvin9403calvin9403 Member Posts: 3,186
    you will need an animation of the actor

    and when the attack button is pressed and ....

    do something
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    Also you might want to think about collision areas. I find the magnitude function to be useful. As more often than not just using a collision rule won't feel right in the context of one character hitting another. i.e collision areas are circles, squares or rectangles but your character animations will probably be human/alien/monster/animal shaped etc
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Hmmmm @honeytribestudios I would more interested in hearing how you use magnitude.
  • 3xL3xL Member Posts: 676
    I think a combination of magnitude and collision can play a role as well..

    What if an enemy is like dhalsim. Long arms or legs? Throws a kick from far?

    Or

    Create collision boxes for enemies and heroes and constrain them to their bodies. Kinda like MUGEN.
  • FallacyStudiosFallacyStudios Member Posts: 970
    For the simplest way to do it. You just need an animation for when they press the attack button and to make a boolean that is set to true when the attack button is pressed and resets itself to false by the time the animation ends. When that boolean is true than collision with your character either does damage or kills it
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    @FryingBaconStudios - Sure, well it's nothing too complicated. Just a straight swap of a collision with a magnitude condition. So you'll see in the image below the the hazard needs to be within 180 pixels of the hero before the hero can be hit.

    image
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited February 2012
    @honeytribestudios that's so simple it's brilliant! I'll be using that in my runner for sure!
Sign In or Register to comment.