Temporary Disable OK button without plugin.

Hey, I wonder if there is a way to use events or a simple "script call" to stop the player from pressing OK for 1-2 seconds. It's during a switch puzzle to stop the player from spamming the button and bugging the puzzle.

P.S Using MZ.
When it's about a single Event you can do a new page on it that is activated by a switch. This page
- is parallel process
- waits a few seconds
- then turns its switch off

I've moved this thread to MZ Support. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/temporary-disable-ok-button-without-plugin.136663/