How do I disable keys on a keyboard

  • is there any way I can disable a key on the keyboard.

    when player collides with crate: Spacebar set disabled

    wait 1.0 sec

    set enabled

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I assume you are doing this so the player can't activate something the spacebar does...

    Two ways,

    Option 1:

    Have the collision set a variable that is in the condition for the spacebar press.. ie. on-collision StopSpace=1.. in conditions for spacebar event add StopSpace=0:

    On spacebar press - Action Do awesome thing.


    Your collision event should be set to change it back to 0 after the 1.0 second wait. This way your not disabling the spacebar itself, just the events it activates.

    Option 2: Put the spacebar event inside its own group and then have your collsion set this group "deactivate" for 1.0 second then "activate" again.

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