St4nley
Member
- Apr 13, 2013
- 469
- 76
TO MAKE A LONG STORY SHORT, FINAL PROJECT DUE MONDAY, AND I CHOSE THE WRONG GAME
so now i am making billards
and right now, im fucking stuck and i feel like a noob because i am
how do i make a shape that is a ball stay remaining in one spot untill it is hit (billiards)
so now i am making billards
and right now, im fucking stuck and i feel like a noob because i am
how do i make a shape that is a ball stay remaining in one spot untill it is hit (billiards)
Code:
Private Sub Timer1_Timer()
imgball.Top = imgball.Top - goodVel
shpBall.Top = shpBall.Top - BallHVel
'IF PLAYER BALL HITS BOTTOM
If imgball.Top + imgball.Height > Form2.ScaleHeight Then
goodVel = goodVel * -1
End If
'IF GAMEBALL HITS TOP
If imgball.Top < 0 Then
goodVel = goodVel * -1
End If
'IF GAME BALL HITS BOTTOM
If shpBall.Top + shpBall.Height > Form2.ScaleHeight Then
BallHVel = BallHVel * -1
End If
'IF GAME BALL HITS TOP
If shpBall.Top < 0 Then
BallHVel = BallHVel * -1
End If
'///////////////IF THE WHITE BALL HITS THE GAME BALLS\\\\\\\\\\\\\\\\\\\\\\
If imgball.Top < shpBall.Height + shpBall.Top Then
goodVel = goodVel * -1
BallHVel = BallHVel * -1
End If
End Sub