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,375
Reaction score
802
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,315
Reaction score
8,754
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,375
Reaction score
802
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 Posts

Latest Profile Posts

I think it's ready - Chapter Selection:
unknown.png
On another more gaming topic, I paid 20 bucks for a visual novel to emotionally destroy me. I may write an entry about that.
1638611395177.png
Reading about metaverses recently. I can totally imagine myself in the future, logging in with VR glasses to a virtual beach villa sitting in a virtual chair, with a virtual laptop facing the sea...coding 16-bit RM.
Mod name: "[Game name] Gameplay Overhaul"
What they actually mean: "Here is a mod that makes the game harder."
I decided to reinstall one of my most favourite game of all times, Gothic 2. Time to get back to Khorinis!

Forum statistics

Threads
117,171
Messages
1,105,133
Members
153,267
Latest member
Christopher626
Top