
-----------------------------------
13ennett
Fri Dec 15, 2006 10:52 am

ISP help - with my intro screen please!!!
-----------------------------------
Hey evrybody :D ..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.


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 :oops:

-----------------------------------
Tony
Fri Dec 15, 2006 11:48 am


-----------------------------------
you need to have that Input.KeyDown() inside the loop, else you never check for the updated keyboard status :wink:

-----------------------------------
uberwalla
Fri Dec 15, 2006 5:24 pm


-----------------------------------
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.

-----------------------------------
iamcow
Sat Dec 16, 2006 3:35 pm


-----------------------------------
...or you can just use Input.Pause. This pauses the program until a button is pressed

-----------------------------------
uberwalla
Sat Dec 16, 2006 6:40 pm


-----------------------------------
aha true. i never thought of that one :P i could use that in some of my programs. lol . thx  8-)

-----------------------------------
13ennett
Sun Dec 17, 2006 8:11 pm


-----------------------------------
sweet thanks for all the help :P
