i am trying to get my program (Pong) to reconize the bat on the left side of my form the ball will bounce off the bat but it also bounces of the bat when it misses if ya know what i mean??
VB Code:
Private Sub tmrMove_Timer() If Counter1 >= 4 Then MsgBox "Game Over...", vbInformation = vbOKOnly, "Pong" Call Form_Load End If 'Give focus to the scrollbar vsbBatMove.SetFocus imgMain.Move imgMain.Left + Xinc, imgMain.Top + Yinc 'Right If ScaleWidth <= imgMain.Left + imgMain.Width Then _ Xinc = Xinc * -1 'Bottom If ScaleHeight <= imgMain.Top + imgMain.Height Then _ Yinc = Yinc * -1 'Top If ScaleTop >= imgMain.Top Then _ Yinc = Yinc * -1 'Bat 'THIS IS WHERE I AM HAVING TROUBLE' If imgMain.Left <= shpLeftBat.Left Then _ Xinc = Xinc * -1 'Miss Bat If ScaleLeft >= imgMain.Left + imgMain.Width Then imgMain.Move 4800, 2400, 1095, 975 Counter1 = Counter1 + 1 End If End Sub
Please point me in the right direction
Thanks in advance RedAngel![]()


Reply With Quote

Mark Thread Resolved