Author |
Message |
fear01
|
Posted: Tue Nov 22, 2005 5:47 pm Post subject: Pause and Continueing a Game |
|
|
I have just started using turing this semester and was wondering how I could pause game motion and then continue it with two different keys. I am using the Input.Keydown command and using the keys "p" and "c" to do it, uh could anyone help out a newbie with this problem? I have tried using commands like delay and pause, but no luck. Any help would be great. Thanks. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Mystify
|
Posted: Tue Nov 22, 2005 5:51 pm Post subject: (No subject) |
|
|
Are you trying to pause the whole thing or just something like a timer? |
|
|
|
|
|
person
|
Posted: Tue Nov 22, 2005 6:06 pm Post subject: (No subject) |
|
|
code: |
var chars : array char of boolean
loop
Input.KeyDown (chars)
if chars ('p') then
loop
Input.KeyDown (chars)
drawfilloval (Rand.Int (1, 1000), Rand.Int (1, 1000), 3, 3, 1)
exit when chars ('c')
end loop
end if
end loop
|
|
|
|
|
|
|
Mystify
|
Posted: Tue Nov 22, 2005 6:12 pm Post subject: (No subject) |
|
|
There you go |
|
|
|
|
|
fear01
|
Posted: Tue Nov 22, 2005 9:07 pm Post subject: (No subject) |
|
|
Thank you Mystify, it worked and I'm done! Now i have time to do nothing. I would hug you but your there and i'm here, so just a simple text of "thank you". |
|
|
|
|
|
fear01
|
Posted: Tue Nov 22, 2005 9:13 pm Post subject: (No subject) |
|
|
Ack! Sorry, i glanced at the code and didn't see the author, i would like to thank you too, uh "person". "HUGS" and "KISSES"!!! |
|
|
|
|
|
The_Triangle
|
Posted: Thu Nov 24, 2005 4:15 pm Post subject: (No subject) |
|
|
fear01 wrote: Ack! Sorry, i glanced at the code and didn't see the author, i would like to thank you too, uh "person". "HUGS" and "KISSES"!!!
watch yerself there bud
uh anyone know what the char of boolean for spacebar is ?
i tried KEY_SPACE, didnt do much. |
|
|
|
|
|
person
|
Posted: Thu Nov 24, 2005 7:00 pm Post subject: (No subject) |
|
|
32 |
|
|
|
|
|
Sponsor Sponsor
|
|
|
GlobeTrotter
|
Posted: Thu Nov 24, 2005 7:15 pm Post subject: (No subject) |
|
|
The_Triangle wrote: fear01 wrote: Ack! Sorry, i glanced at the code and didn't see the author, i would like to thank you too, uh "person". "HUGS" and "KISSES"!!!
watch yerself there bud
uh anyone know what the char of boolean for spacebar is ?
i tried KEY_SPACE, didnt do much.
(' ')
should do it. Similarly, for a letter it's
('a')
('z') |
|
|
|
|
|
codemage
|
Posted: Fri Nov 25, 2005 9:03 am Post subject: (No subject) |
|
|
If you need to know what the code for a specific key is, run KeyDown1.t in the examples/fun directory of Turing. |
|
|
|
|
|
r0ssar00
|
Posted: Fri Nov 25, 2005 2:48 pm Post subject: (No subject) |
|
|
you could also look up an ascii table on the inet, theres so many, and i just find the one at the top of search results the most useful. turing uses this table, so just save it to your desktop or something. its invaluable to have. |
|
|
|
|
|
person
|
Posted: Fri Nov 25, 2005 6:52 pm Post subject: (No subject) |
|
|
Quote: 32
i already posted the chr |
|
|
|
|
|
|