Computer Science Canada

Is there a command that will let me do this?

Author:  Kman43759 [ Thu Oct 09, 2014 2:28 pm ]
Post subject:  Is there a command that will let me do this?

What is it you are trying to achieve?
<
Id like to know if theres a way to have it so if the person doesnt enter something in during a get, something happens... for example in my game im making I want to have it so it comes up saying "duck!" and then there is a get and if you dont type something it comes up saying "you didnt duck in time so you died">


What is the problem you are having?
<I dont know how to do this>


Describe what you have tried to solve this problem
<Nothing>


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>

Turing:


<Add your code here>



Please specify what version of Turing you are using
<4.1>

Author:  Tony [ Thu Oct 09, 2014 3:23 pm ]
Post subject:  RE:Is there a command that will let me do this?

"get" is a blocking command -- it "blocks"/waits for action to finish, before moving on to the next line of code. You want non-blocking input handling -- something that will not wait for the user. You can build something like that from hasch and getch.


: