Could someone show me how to use gettickcount, any declarations I need in modules, etc, and maybe an example? This is what I currently have, so maybe you can just tell me what is wrong. I DO have CheckMove in a loop, so thats not the problem.
LastPress is declared in a seperate module as a global integer. PC.(all that stuff) is in the same module as LastPress under a new type I made. Although it says Text1.Caption, its actually a label... I forget why I named it Text1. Nothing is wrong with the GetKeyState stuff, because before I put the gettickcount stuff in, it worked (but it went so fast it overflowed before my finger was off the button)
Sub CheckMove()
If LastPress > gettickcount Then
LastPress = gettickcount + 50
If GetKeyState(vbKeyUp) = 1 Then
PC.xvel = PC.xpos - PC.xview
PC.yvel = PC.ypos - PC.yview
PC.xpos = PC.xpos + PC.xvel
PC.ypos = PC.ypos + PC.yvel
frmGame.Text1.Caption = PC.xpos
End If
End If
End Sub
If you know whats wrong, please let me know.
