"Unpress" a held button.

I'm toying with a small "searching" system that looks like this.
View attachment 236188
It works like how minecraft block-breaking does; hold the button down until the condition is met, if you release prematurely you have to start over. However this has the issue of any messages that appear vanishing quickly as you still have the button held down.

Is there a way to have MV ignore the button's held-down state until it's released?
there are a couple .

input.isTriggered
input.isPressed
input.longPressed
input.isReleased (or around this).

but there was also a tutorial on the time when the button is pressed,
and when released if < x frames or in between > x && < y,
but I need to see where that one is, which is what you look for?
What I need is to force MV to treat the button as no longer being pressed while it's being held down. input.isReleased is probably a step in the right direction, I'll see what I can do with it. To make it more clear.

OK is pressed <- This is me physically pressing the key
Event processes until the third If statement
OK is released <- This is RPG Maker simulating me releasing the key, I am still physically holding the key
OK is released <- This is me physically releasing the key.
Just as a quick suggestion, you could assign a different key to your searching that isn't OK.

MV polls continuously for button input. You could call a function to clear the button being considered pressed, but the next input loop (which might be faster than a frame, I haven't looked at it closely) would just pick it up again. So I think that telling it to be ignored until some other directive that you create would take a plugin to be written for your purposes.

Using a different key you could implement yourself.
You could call a function to clear the button being considered pressed, but the next input loop (which might be faster than a frame, I haven't looked at it closely)
Let's try it anyway, what would this function be? I don't see anything like it in the script reference.
what would this function be? I don't see anything like it in the script reference.
No, you wouldn't, because the engine doesn't ever try to tell itself to make a button be un-pressed.

All of the code for the Input manager is in rpg_core.js. What you might try to mess with is the ._currentState array - but, as I said, I expect simply clearing that won't achieve what you want, you'd need to write more complex code to actively ignore input for a period of time (or until you switch it back on).
That's beyond my programming skill but thanks for the information, it at least puts me in the spot I need to be looking at. I'll see if I can do anything with it.
If you hover over the Word "Text" in the Textbox with your mouse cursor for 2 or 3 seconds, than you get a list with commands to use in it.
That info text appears for most Event commmands.

\| this makes the Textbox Wait for 1 Second.
\. this is wait for 1/4 Second

Try something like this in your Textbox:

You found Bandages. \| \|

It should fix your Problem and the Textbox should stay longer Open with this commands.

Original thread: https://forums.rpgmakerweb.com/threads/unpress-a-held-button.149954/