How do I disable platform input buttons?

0 favourites
  • 8 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • I have a character object with platform behavior. Player has an attack where it jumps in the air and stays in air for a bit. I want to disable the functioning of the arrow keys (button for directional movement) while I am in the air.

    I tried "Platfrom: Start Ignoring Input" and it's not disabling the arrow keys. How do I disable the keys?

  • ....

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • korbaach

    Hi. thanks for the file, but it doesn't work on my game because I have no events that has conditions based on pressing the directions (arrows). My platform object has the default controls as "yes".

    Attack:

    The player (platform char) jumps up, then I press X, player stops falling down and uses attack animation, then after animation finishes, goes back down to ground.

    The bug (originally explained) happens during when I press left or right arrow during the attack animation while in air, the player gets stuck there forever and never goes down to ground.

  • attack animation is playing....set platform behavior Disabled

    Else...set platform behavior Enabled ???

  • korbaach

    thanks again. I have seen your file but I haven't tried it on my file yet.

    https://www.scirra.com/manual/100/platform

    I'm not sure why the "Platform: Start ignoring input" is not working as described there in the manual. That (disabling the arrow keys, while letting the platform object still able to free fall) is exactly what I needed. I tried "Platform: set disable" but it's not working like I intended.

    Also, why does your file takes literally less than a second to load on preview? mine takes like 45 secs at the very least to load everytime.

  • I do not know man, I'm afraid that without see your capx, I can't help you...

  • korbaach

    Here is a simplified version of what I wanted to do. My original file is too complex (it has many complex systems for my game so I made this new file).

    Hold pressing X in air will make the player go to attack animation. During this animation, pressing left or right won't have an effect.

    In my original file, pressing left or right during attack in air gets it stuck in air forever.

    In events, I use "Control" because I need it for my other systems. State and Gravity are also variables I used in my original file. They have other uses aside from how I used them in the file attached. Too many to explain and not related to the problem.

    Long story short, it works perfectly here in my new file, still problems in old one. It's 1am here, I will look tomorrow again.

  • Just put the player movement in a sub-event under player.attacking = 0.

    Or put the movement events in a group that is disabled when the player is attacking, and enabled afterwards.

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