How do I make a melee attack?

0 favourites
  • 9 posts
From the Asset Store
126 vocal sound effects interpreted by three different actors divided in: Dialogues, attacking, dying, pains, emotions
  • Hello,

    I am sure this has been asked before but I couldn't find it in the forums.

    Can someone tell me how to create a melee attack for a platform game?

    Thank You

  • Use instance variables.

    If melee =1 and action pressed-Do melee attack.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes but how do I actually make it.

    For example:

    Do I spawn a bullet with a range limit?

    Do I spawn an object in front of my character?

    Sorry but I haven't done this before, what's the logic?

  • Yes but how do I actually make it.

    For example:

    Do I spawn a bullet with a range limit?

    Do I spawn an object in front of my character?

    Sorry but I haven't done this before, what's the logic?

    You said you want to do a melee attack,use different animation frames to do that.

    Why do you need to spawn an object?

    If you want to do that,You can use another instance variable.

  • "Why do you need to spawn an object?"

    How are the enemies are going to be affected? They have to collide with something to hurt them, right?

    I know It must be very simple but I still don't get it. Maybe there is a simpler method than the one I have in mind.

    If you can, please explain.

    Thanks

  • I think skozax is asking how to make a melee attack that can be interacted with. , try going into your melee attack animation and adding an image point over the character's fist (or whatever you hit with). Then create another small sprite about the size of the character's fist, set invisible.

    Then it's: When character's animation ("melee attack") is playing > Set (fist sprite) position to character's image point (fist). Then you can base your collisions etc around the fist sprite.

    Something like that should work

  • Just a collision event will also work.Each animation frame can have different collision polygon.

  • (Forgot about collision polygons )

  • Thank you all for your help!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)