Is there a way to disable certain keyboard inputs? I have a custom event menu made where the player can push any direction to access different buttons, however the player can hold down the key or keep pressing the key and it will continue to process the conditional branch of that key, which is comprised of a sound each time the button is selected. It is a little annoying and I would love to fix this. Any ideas?
Disable certain keyboard keys?
● ARCHIVED · READ-ONLY
-
-
you need scripts to change the keyboard settings in that way. That said, why don't you remove the sound from that branch, leaving it completely empty? if nothing happens when a key is pressed, then the player won't be able to see the difference between a deactivated and an unused key.
-
Well I would like the initial sound to be played to give an audible cue that the menu has been changed.
-
Consider going into the Help menu and searching for "Input". You'll find several things that you might find helpful.
For example, I assume you are using a Conditional Branch that checks which button is being pressed. You can instead choose "Script" and use "Input.trigger?:)C)" to see if the player is pressing the confirm button... and it won't keep activating if the player is holding down the button.
Or, if you are just using Touch Events that the player touches to make a selection, consider "disabling" them with a second mode (and a self-switch) for a short amount of time once the event runs so that it doesn't run repeatedly. -
Wavelength, I have tried using Input.trigger before and it makes the menu very clunky. It won't repeat the sounds if held down but it also does not respond as well as the Button press conditional branch.
https://www.dropbox.com/s/7ccyqp9wzoe30dt/Untitled.png?dl=0
Here is a screenshot of the start of my menu. Every other section is basically the same just on different button presses. Any ideas? -
What do you mean, Custom Event Menu - your menu is made with events?
Just move the 'play sound' from the "if button is pressed" check to the "if selection is changed" check.