Computer Science Canada Window of Time |
Author: | Hakneedshelp [ Wed Jan 18, 2017 7:07 pm ] | ||
Post subject: | Window of Time | ||
What is it you are trying to achieve? <Replace all the <> with your answers/code and remove the <>> What is the problem you are having? My program is a bunch of procedures that are called from keyboard commands. (Input.KeyDown) It is a sort of reaction game. The procedure have to have a window of time to input the keyboard answer. For example, if you need to press F to survive, I need a window of time to press F, which I found to be not possible through delays or for loops. Describe what you have tried to solve this problem I tried to put the Input.KeyDown commands into the procedures, however, they programs jumps back into the procedures once theyre called out to a different procedure. I also tried to create that window of time through delays and for loops, but no commands can be inputted while a delay or for loop is active. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <>
Please specify what version of Turing you are using Using Turing 4.1.1 |
Author: | NightOwl [ Wed Jan 18, 2017 10:16 pm ] |
Post subject: | RE:Window of Time |
I don't really understand your question. What do you mean by "A window of time"? Can you explain in more details about how you'd want the program to behave? |
Author: | Hakneedshelp [ Thu Jan 19, 2017 7:48 am ] |
Post subject: | Re: Window of Time |
The Key actions cannot be inputted-In other words, i need a way to delay a certain amount of time while still being able to input key commands. using a standard delay doesn't work, nor does using a really long for loop. |
Author: | Insectoid [ Thu Jan 19, 2017 9:05 am ] |
Post subject: | RE:Window of Time |
Time.Elapsed returns the number of milliseconds since the program started running. I'm sure you can find a way to use this to your advantage! |
Author: | 5c0r910n [ Thu Jan 19, 2017 9:41 am ] |
Post subject: | RE:Window of Time |
MOD EDIT: Try not to give out the answers guys. We'd rather help you figure it out for yourself. |