How do I program directional attacks in a platformer?

1 favourites
  • 9 posts
From the Asset Store
Make your dream action platformer game effortlessly with this template!
  • Hey all, my name is Brando and I'm attempting a Metroidvania type game. So far, my character can run, jump, duck, and attack while standing... but I can't seem to figure out how to make him attack while ducking. I've got the animation, but I guess maybe I just don't know how to trigger it? If I can figure this out, maybe I can figure out how to do a jumping attack and then a downward diagonal attack. Looking to basically set SotN-esque controls here. Can anyone help? Thanks.

    NOTE: This is my very first attempt at anything involving making a video game. I'm a complete noob. Go easy on me, eh?

  • I guess you know what you want the player to do to make that attack..

    So when those conditions are met play the attack..

    So for example:

    keyboard down button is down and shift is down

    play attack animation

  • Well I understand the concept of the thing. What I don't understand is how to make something happen when I'm pressing more than two buttons. I figured out how to crouch attack, but now I can't figure out how to diagonal crouch attack.

    down = crouch

    down + attack = crouch attack

    down + right + attack = ? Not crouch attack.

    Is there a way to upload project files here or? I could really use the help of someone who knows this program better than I do. I need more advice than being told to lump conditions together and assigning actions to them. How do I lump them? Do I assign a diagonal crouching attack under down, right, or attack? Know what I mean? I think my problem is that something is conflicting and I'm trying to minimize that.


  • Maybe you'd like this:

    easy keyboard

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I totally would if I had any idea of how to implement such a thing, but alas, I am an amateur. Any clue how I would go about this? As of right now I'm having a hard enough time with the Platform. I know nothing about code whatsoever. That's why I'm using (or trying to use) Construct 2. Any help would be greatly appreciated. Thanks!

  • Ok, so I've been messing around with it and I noticed something. Down + Left + Attack executes the crouching diagonal attack.

    However, Down + Right + Attack does not...

    UNLESS I hold down Down, then Right, then Attack (in that order) and then release the Right button.

    If there is a way to upload the project file, and if someone would be willing to help me with this, I would be eternally grateful.

  • If there is a way to upload the project file, and if someone would be willing to help me with this, I would be eternally grateful.

    The attachment system is not functionaing at the moment.

    To attach a file, you will need to use one of the many free storage sites, such as the ones from Dropbox, Google and MicroSoft.

    Also, due to your low rep, you will not be able to add links yet unless you add a space or other character to the url, such as:


  • dropbox(DOT)com/s/mwn871r2am96xja/Brando%20game%20demo.capx?dl=0

    Try not to judge me too harshly, I'm a complete amateur.

  • Anyone end up figuring this out? Why does it work on the left side and not the right? Nothing seems to be interfering at all. Unless I missed something... but there's not really much there, either... Am I doing this right?

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