Disable keyboard input with events?

0 favourites
  • 4 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • Hi is it possible to disable keyboard input in an "IF" or an "OR" statement/event?

    I can't seem to figure this one out.

    I'm not using behaviors, so I would want to do this straight in the event sheet.

    Also is it possible to lock one key once the other key is pressed? For example if arrow down is being held, pressing arrow up simultaneously won't do anything.

    At the moment pressing 2 keys together messes up my values.

    Thanks a bunch as always!

    EDIT: Im starting to think its not possible to entirely disable someones input in order not to leave the user "hanging" and unable to do anything on their computer, including closing the game.

  • Ok I got it working.

    For anyone that is interested, I created a variable:

    Keyboard_input_toggle = 1

    Nested all the keyboard controls in an IF Keyboard_input_toggle=1.

    Then when I wanted to disable keyboard for certain controls, just created and IF event (something happens) ---> Keyboard_input_toggle = 0

  • You could put the keyboard-events in a group and activate/deactivate the group in the same way..

    Might also help making you even-sheet easier to view..

  • Try Construct 3

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

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

    Deactivating/Activating group? Wow, that is sweet!

    Thanks for the info, now time to delete some global variables and settle for group toggling for some situation, Ill get my event sheet cleaner for sure!

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