This is what I have...if you look at it carefully, you will see, every time you push the button, the "animation" goes, but it slows the whole program, can I make it only slow down that sub?
thanks allCode:Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) 'CHecks keypresses If KD(vbKeyLeft) = True Then Player.x = Player.x - 1 Player2.x = Player.x Player.DC = picPlayer2.hDC If Player.x < 0 Then: Player.x = 0 End If If KU(vbKeyLeft) = True Then Call Skate(False) End If Private Sub Skate(ifSkate As Boolean) 'makes the guy skate Do Until ifSkate = False If SkateVar = 1 Then Player.DC = picPlayer.hDC If SkateVar = -1 Then Player.DC = picPlayer2.hDC Sleep (100) SkateVar = Val(SkateVar) * (-1) ifSkate = False Loop End Sub





Reply With Quote