How do I ignore just one input?

0 favourites
  • 7 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • How do I ignore just one input? For example, say I want to ignore the up arrow key but not the left or the right.

    Tagged:

  • Depends on the specific scenario and what you are trying to achieve, but in general you could have a variable that is on/off and for example the up key only works if the variable is on (with a condition on the key press) and so you set the variable to off to disable the up key.

  • Yes but what would the script be to ignore the input for the up arrow key? I already have a condition and need to add an action in the form of JS because the only option elswise is to ignore all inputs not just the up arrow key.

  • The only option is to ignore all inputs ? Not sure what you mean by this. If you explain what behaviours you are using and what you are trying to do in the game then we can give more help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am using the car behavior. So under event sheet I have a global variable that is named "DriveStop" and is default false. My goal is to have the up arrow key stop working when "DriveStop" is true, but I want the left/right arrow keys to continue steering the car. If I create the condition + system: is DriveStop my only option for ignoring car inputs is to ignore all of them.

  • Does anyone know how to do this with the car behavior?

  • You first need to set up your own controls rather than default, then you can disable the key assigned to accelerate with a variable. For future posts please add more info in the initial post such as I am using the Car behaviour.

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