Author |
Message |
Ryft
|
Posted: Tue Jun 07, 2005 2:48 pm Post subject: Need Help with Putting Pause in Game... |
|
|
How would I go about doing this? I tried just doing a simple:
code: |
if chars ('p') then
Input.Pause
end if
|
This doesn't seem to work if I repress the same key however. So I'm wondering how I would make a pause that would be activated and deactivated with the same key? Thx. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
[Gandalf]
![](http://compsci.ca/v3/uploads/user_avatars/189297994e4c716fec7f1.png)
|
Posted: Tue Jun 07, 2005 3:11 pm Post subject: (No subject) |
|
|
Make a boolean statement that says whether or not the key is pressed:
Turing: | var ppressed : boolean := false
var chars : array char of boolean
Input.KeyDown (chars )
loop
if chars ('p') then
if ppressed = false then
ppressed := true
Input.Pause
elsif ppressed = true then
ppressed := false
end if
end if
end loop |
That should work. |
|
|
|
|
![](images/spacer.gif) |
Bacchus
![](http://img104.exs.cx/img104/9206/ravenmoon12ns.jpg)
|
Posted: Tue Jun 07, 2005 9:36 pm Post subject: (No subject) |
|
|
Oooor
code: |
var chars:array char of boolean
loop %Your main loop
%Your other stuff
Input.KeyDown(chars)
if chars('p') then
loop
Input.KeyDown(chars)
if chars('p') then
exit
end if
end loop
end if
end loop |
|
|
|
|
|
![](images/spacer.gif) |
|