Temp deactivating user input

Is 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."


request (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.

Thanks Pykrete.

I'll try what you have suggested.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums