KEYCONF : Repeating Keystroke
Moderator: GZDoom Developers
-
- Posts: 324
- Joined: Wed Aug 02, 2017 3:01 pm
- Location: Illinois
KEYCONF : Repeating Keystroke
I have a bank script in a map and it is really slow having to press a key 100 times to give or take $100 so I'm asking that a new keyword be made so that a key will repeat quickly after being pressed for a second or two.
-
- Posts: 2110
- Joined: Thu May 02, 2013 1:27 am
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
Re: KEYCONF : Repeating Keystroke
You can easily do this yourself with a keybind that triggers on both key press and release.
Then you handle the repeating from your own code by setting a bool and starting a counter once the key is pressed - then you just execute the action every time a certain amount of time has passed according to the timer.
Code: Select all
alias +MyKey "netevent \"MyKey:Pressed\""
alias -MyKey "netevent \"MyKey:Released\""
// Make the keybind for "+MyKey"
-
- Posts: 324
- Joined: Wed Aug 02, 2017 3:01 pm
- Location: Illinois
Re: KEYCONF : Repeating Keystroke
I think I understand what you mean but I can't make any sense of this code you posted
-
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Re: KEYCONF : Repeating Keystroke
Sounds like the best solution is to edit the script so you've got an option for taking out $1 per press, or a larger amount per press, or hold to take out $1 each tic that the engine notices that the button is being pressed.
-
- Posts: 324
- Joined: Wed Aug 02, 2017 3:01 pm
- Location: Illinois