ISP help - with my intro screen please!!!
Author |
Message |
13ennett
|
Posted: Fri Dec 15, 2006 10:52 am Post subject: ISP help - with my intro screen please!!! |
|
|
Hey evrybody ..how it going? anyways i was wondering if anyone could help me with an intro screen I am making for my GSP. I can't figure out how to get "Press any key to contiune" to wor. Heres my sameful attempt at it for someone to tellme what im doing wrong.
code: |
setscreen("graphics:vga")
setscreen("nocursor")
colourback(black)cls
var mypic :int := Pic.FileNew ("F1 LOGO.jpg")
var x,i,font1 :int
font1 := Font.New ("CopprplGoth Bd BT:8:italic")
x := maxx
loop
Pic.Draw (mypic, x, 200, picCopy)
x -= 1
exit when x = 250
end loop
delay(1000)
Font.Draw ("The Game", 240, 210, font1, white)
colour(0)
locate(16,26)
delay(2000)
var chars : array char of boolean
put "Press any key to continue "
Input.KeyDown (chars)
loop
if chars (KEY_ENTER) then
exit
end if
end loop
|
allhelp would be appreciated...and yesi do realise i am a total n00b ![Embarassed Embarassed](images/smiles/icon_redface.gif) |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Fri Dec 15, 2006 11:48 am Post subject: (No subject) |
|
|
you need to have that Input.KeyDown() inside the loop, else you never check for the updated keyboard status ![Wink Wink](http://compsci.ca/v3/images/smiles/icon_wink.gif) |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
uberwalla
![](http://www.mac-help.com/images/starwars.gif)
|
Posted: Fri Dec 15, 2006 5:24 pm Post subject: (No subject) |
|
|
yes as he said use input.keydown IN the loop. but as you have it, it only works for the enter key.
to use it for any key simply just use the getch command.
basically all you have to do is declare a variable in your program like this:
var ch :string (1)
then you simply call getch:
getch (ch)
which all it does is wait til you press any key to continue on with your prog. |
|
|
|
|
![](images/spacer.gif) |
iamcow
|
Posted: Sat Dec 16, 2006 3:35 pm Post subject: (No subject) |
|
|
...or you can just use Input.Pause. This pauses the program until a button is pressed |
|
|
|
|
![](images/spacer.gif) |
uberwalla
![](http://www.mac-help.com/images/starwars.gif)
|
Posted: Sat Dec 16, 2006 6:40 pm Post subject: (No subject) |
|
|
aha true. i never thought of that one i could use that in some of my programs. lol . thx ![Cool Cool](images/smiles/icon_cool.gif) |
|
|
|
|
![](images/spacer.gif) |
13ennett
|
Posted: Sun Dec 17, 2006 8:11 pm Post subject: (No subject) |
|
|
sweet thanks for all the help ![Razz Razz](http://compsci.ca/v3/images/smiles/icon_razz.gif) |
|
|
|
|
![](images/spacer.gif) |
|
|