VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This is v1.5 The only difference between v1.0 and this one is there is a third player an oval, and

by Harn (8 Submissions)
Category: Games
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Mon 15th December 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This is v1.5 The only difference between v1.0 and this one is there is a third player an oval, and a non-visible image moving from one screen

Rate This is v1.5 The only difference between v1.0 and this one is there is a third player an oval, and



If KeyCode = vbKeyDown Then
Shape1.Top = Shape1.Top + 500
End If
If KeyCode = vbKeyUp Then
Shape1.Top = Shape1.Top - 500
End If
If KeyCode = vbKeyLeft Then
Shape1.Left = Shape1.Left - 500
End If
If KeyCode = vbKeyRight Then
Shape1.Left = Shape1.Left + 500
End If

If KeyCode = vbKeyS Then
Shape2.Top = Shape2.Top + 500
End If
If KeyCode = vbKeyW Then
Shape2.Top = Shape2.Top - 500
End If
If KeyCode = vbKeyA Then
Shape2.Left = Shape2.Left - 500
End If
If KeyCode = vbKeyD Then
Shape2.Left = Shape2.Left + 500
End If
If KeyCode = vbKeySpace Then
    Line1(slug).X1 = Shape1.Left
    Line1(slug).X2 = Shape1.Left
    Line1(slug).Y1 = Shape1.Top
    Line1(slug).Y2 = Shape1.Top + 100
    Line1(slug).Visible = True
    slug = slug + 1
    If slug = 40 Then slug = 0
End If
If KeyCode = vbKeyTab Then
    Line2(slug).X1 = Shape2.Left
    Line2(slug).X2 = Shape2.Left
    Line2(slug).Y1 = Shape2.Top
    Line2(slug).Y2 = Shape2.Top - 100
    Line2(slug).Visible = True
    slug = slug + 1
    If slug = 40 Then slug = 0
    End If
If KeyCode = vbKeyDelete Then
InputBox score2
    If score2 >= 50 Then
    MsgBox "Player 1 wins"
    End If
    End If
If KeyCode = vbKeyNumpad8 Then
Shape3.Top = Shape3.Top - 100
End If


    End Sub



Private Sub Form_Load()
shoot = False
End Sub

Private Sub Timer1_Timer()
For h = 0 To 1
Shape4.Left = Shape4.Left + 100
If Shape4.Left > hi.Width Then
Shape4.Left = 0 - Shape4.Width
End If
Next h

End Sub

Private Sub Timer2_Timer()

    For i = 0 To 40
        Line1(i).Y1 = Line1(i).Y1 - 100
        Line1(i).Y2 = Line1(i).Y2 - 100
        Line2(i).Y1 = Line2(i).Y1 + 100
        Line2(i).Y2 = Line2(i).Y2 + 100
        
        If Abs(Shape1.Left + 100 - Line2(i).X1) < 275 And _
            Abs(Shape1.Top + 100 - Line2(i).Y1) < 275 Then
           score2 = score2 + 1
           score1 = score1 - 1
           Label2 = score2
           Label4 = score1
           Beep
        End If
        If Abs(Shape2.Left + 100 - Line1(i).X1) < 275 And _
            Abs(Shape2.Top + 100 - Line1(i).Y1) < 275 Then
            score1 = score1 + 1
            score2 = score2 - 1
            Label4 = score1
            Label2 = score2
            Beep
        End If
    Next i

   
End Sub

Private Sub Timer3_Timer()
For h = 0 To 1
Image1.Left = Image1.Left + 100
If Image1.Left > hi.Width Then
Image1.Left = 0 - Image1.Width
End If
Next h
End Sub


Download this snippet    Add to My Saved Code

This is v1.5 The only difference between v1.0 and this one is there is a third player an oval, and Comments

No comments have been posted about This is v1.5 The only difference between v1.0 and this one is there is a third player an oval, and . Why not be the first to post a comment about This is v1.5 The only difference between v1.0 and this one is there is a third player an oval, and .

Post your comment

Subject:
Message:
0/1000 characters