Temp deactivating user input
Brian5757
17 Feb 2020, 01:38Is there a way of temp deactivating user input?
I want to put a delay between messages but during the delay I don't want the user to type anything at the keyboard.
I need something like:
print message "I see an object in the distance coming towards me..."
deactivate user input
SetTimeout(10)
activate user input
print message "It's a car racing towards me. I wonder what they want."

Pykrete
17 Feb 2020, 09:10request (Show, "Command")
request (Hide, "Command")
These two lines will show and hide the command bar, respectively.
If your game has no method of input other than the command bar - no passage links in a gamebook, or no compass in a text adventure - then the player will be stuck until you give them control back.
In this instance, I think you'd want to do...
request (Hide, "Command")
SetTimeout(10) {
request (Show, "Command")
msg ("It's a car racing towards me. I wonder what they want.")
}```
I think you need to include whatever you want to happen at the end of a timeout/timer script within brackets, like shown. With this script, after 10 seconds have elapsed the player will regain control and the 2nd message will print.
Brian5757
18 Feb 2020, 00:32Thanks Pykrete.
I'll try what you have suggested.