Hi @Klar Shultz ,
To reset Timer, try:
Private Sub tmrAttack1_Tick(sender As Object, e As EventArgs) Handles tmrAttack1.Tick
Dim player1 As Integer = picPlayer1.Location.X
player1 = -1
picPlayer1Attack.Location = New Point(player1, picPlayer1.Location.Y)
If picPlayer1Attack.Bounds.IntersectsWith(lblLeftBarrier.Bounds) Then
tmrAttack1.Stop()
picPlayer1Attack.Visible = False
tmrAttack1.Start()
End If
If picPlayer1Attack.Bounds.IntersectsWith(lblRightBarrier.Bounds) Then
tmrAttack1.Stop()
picPlayer1Attack.Visible = False
tmrAttack1.Start()
End If
End Sub
Timer.Stop() , then Timer.Start() worked as a reset.
Best Regards,
Xingyu Zhao
*
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.