ImpossibleSnail

Veteran
Veteran
Joined
Jul 2, 2018
Messages
45
Reaction score
4
First Language
English
Primarily Uses
RMVXA
I've been googling this for a while and it feels like none of the answers people suggest work...How do I totally clear out keyboard input? I'm not sure what to call this, but in game maker there's a function io_clear() that achieves this, does Ruby or RPG maker have the same thing?

For example, I have a minigame that says "press space to start, and when playing press space to quit" and when the player presses space to start, as soon as it starts the game is still registering the same "space" input and immediately quits the game. I've tried putting "wait" commands in but for some reason even that doesn't always work. Is there a simple function that just, forgets the players current button press until they release, and press again?
 

gimmer_

Veteran
Veteran
Joined
Jan 13, 2021
Messages
60
Reaction score
35
First Language
English
Primarily Uses
RMMV
Input.clear() in a script processor should reset the Input library

Ignore me, I clicked on a latest threads thread and didn't know I moved to VX Ace's forum
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,387
Reaction score
808
First Language
English
Primarily Uses
RMVXA
Is there a simple function that just, forgets the players current button press until they release, and press again?
It's probably your input check that is wrong.
Input.press? will run constantly (afaik) just like Input.repeat?, but Input.trigger? will check once.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,341
Reaction score
8,767
First Language
German
Primarily Uses
RMMV
if the tip above doesn't help, we need to see how you handle input to give you any further advice.
 

ImpossibleSnail

Veteran
Veteran
Joined
Jul 2, 2018
Messages
45
Reaction score
4
First Language
English
Primarily Uses
RMVXA
I think that did it actually! I had just been using the option off the menu that was press only. It seems to be working.

Just out of curiosity, in case its necessary for something else in the future, IS there an input clear in Ruby or RPG maker?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,387
Reaction score
808
First Language
English
Primarily Uses
RMVXA
not that I know of. Input is determined by key presses. You hit a key and it acts. The key input is not saved as far as I know.
 

Latest Threads

Latest Profile Posts

My new 49" monitor has been dispatched from the warehouse. Will it arrive tomorrow? The day after? I love that we can track packages now, even if it does only tell me when it's left that end and when it's arrived at the local centre. As long as it doesn't end up in Melbourne again, which has happened before ...
My friend's doing a surprise stream of my game Origin Hunt on Twitch here ! Feel free to stop by :yhappy:
Me, designing it a long time ago: Having an optional boss fight as a random chance to trigger when you fish in a certain spot with a certain type of bait is fun! Cool idea!
Me, trying to playtest everything again: oh god just let me see the boss, my bag is so full of fish!
both love and pain have no boundaries

Forum statistics

Threads
117,229
Messages
1,105,689
Members
153,386
Latest member
fredflol
Top