Pausing screen, So close!!
Blitz3D Forums/Blitz3D Beginners Area/Pausing screen, So close!!
| ||
Hey, i'm trying to create a pausing screen like so:If KeyHit(P) Pause(pausedpic) End If as you can see my pausing is a function called by the key pressed "P" heres the function: Function Pause(picture$) DrawImage picture$,0,0 WaitKey() End Function I'm trying to figure out 2 things... 1. how to make it work (hah) because at the moment it just flickers on when pressed 2. how to make it wait until a like the [P] key is pressed again, not just anykey. |
| ||
Function Pause(picture$); !!! See note !!! flushkeys while not keyhit(25); scancode for p key - see help/scancode picker DrawImage picture$,0,0; !!! See note !!! flip cls wend End Function The note being, why is your picture variable (picture$) a string? But yes, other than that, use scancodes with KeyHit() and KeyDown(). |
| ||
Works perfectly, thanks... i always thought you could say like "25=waitkey()" and it would wait till you pressed [P] thanks |