Apr 22nd, 2000, 05:28 AM
hello,
i am making a game where you are a pong like thing that
has to block incoming sticks of dynamite.
i have used timers so far and they are workin all right,
and i put in some code:
------------------------------------------------------------
Private Sub Timer1_Timer()
Enemy.Top = Enemy.Top + 10
If Enemy.Top + Enemy.Height = U.Top Then
If Enemy.Left > U.Left & Enemy.Left < U.Left + U.Width Then
Timer1.Enabled = False
Enemy.Picture = LoadPicture("C:\windows\start menu\programs\graphics\icons\misc\misc14.ico")
End If
End If
If Enemy.Top = 2040 Then
Face.Picture = LoadPicture("C:\windows\start menu\programs\graphics\icons\misc\face04.ico")
Timer1.Enabled = False
Enemy.Picture = LoadPicture("C:\windows\start menu\programs\graphics\icons\misc\misc14.ico")
End If
End Sub
------------------------------------------------------------
but whenever the enemy and you are at the same top distance,
it stops as though you were under it too. any ideas?
thanks
-t_dawolf
i am making a game where you are a pong like thing that
has to block incoming sticks of dynamite.
i have used timers so far and they are workin all right,
and i put in some code:
------------------------------------------------------------
Private Sub Timer1_Timer()
Enemy.Top = Enemy.Top + 10
If Enemy.Top + Enemy.Height = U.Top Then
If Enemy.Left > U.Left & Enemy.Left < U.Left + U.Width Then
Timer1.Enabled = False
Enemy.Picture = LoadPicture("C:\windows\start menu\programs\graphics\icons\misc\misc14.ico")
End If
End If
If Enemy.Top = 2040 Then
Face.Picture = LoadPicture("C:\windows\start menu\programs\graphics\icons\misc\face04.ico")
Timer1.Enabled = False
Enemy.Picture = LoadPicture("C:\windows\start menu\programs\graphics\icons\misc\misc14.ico")
End If
End Sub
------------------------------------------------------------
but whenever the enemy and you are at the same top distance,
it stops as though you were under it too. any ideas?
thanks
-t_dawolf