Results 1 to 2 of 2

Thread: Works for a while then dies

  1. #1

    Thread Starter
    Hyperactive Member PITBULLCJR's Avatar
    Join Date
    Nov 1999
    Location
    New York
    Posts
    408

    Talking

    Ok I am making a game where there is a ship up towards the top and he fires bullets at 10 subs below. Well it was all fine and dandy until one time I was testing and I realized after a while I had only 4 bullets instead of 5 then I had 3 and then 2. The bullet is reseting itself back to the top of the form like I want it to but for somereason it says I still only have 4 or 3 or 2 bullets left. Maybe you guys can see what is wrong I would glady appriciate it. If you would like me to send the form then just tell me and I will send you the form either by email or I will upload it somewhere. The label3 was just a test to see where the corradinates of the bullets were at all times. The reason it is all on one timer is because it lags very much if you start seperating it all on different timers. Here is the code:

    Code:
    Option Explicit
    Dim a As Integer
    Dim b As Integer
    Dim c As Integer
    Dim d As Integer
    Dim e As Integer
    Dim f As Integer
    Dim g As Integer
    Dim h As Integer
    Dim i As Integer
    Dim j As Integer
    Dim bullets As Integer
    Dim wbullets As Integer
    Dim score As Integer
    
    
    
    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyLeft Then
    If ship.Left > 0 Then
    ship.Move ship.Left - 200
    End If
    End If
    
    If KeyCode = vbKeyRight Then
    If ship.Left < 5040 Then
    ship.Move ship.Left + 200
    End If
    End If
    
    If KeyCode = vbKeyDown Then
    If bullets <> 0 Then
    Image1(wbullets).Move (ship.Left + (ship.Width / 2)), ship.Top + ship.Height
    Image1(wbullets).Visible = True
    wbullets = wbullets + 1
    bullets = bullets - 1
    If wbullets = 5 Then
    wbullets = 0
    End If
    End If
    End If
    
    
    
    End Sub
    
    Private Sub Form_Load()
    bullets = 5
    End Sub
    
    Private Sub Timer1_Timer()
    If a = 0 Then
    If sub1.Left + sub1.Width < (-1000) Then
    sub1.Top = (Rnd * 4500) + 1000
    sub1.Visible = True
    End If
    sub1.Move sub1.Left + 20
    If sub1.Left > 7500 Then
    a = 1
    End If
    End If
    
    If a = 1 Then
    If sub1.Left > 7500 Then
    sub1.Top = (Rnd * 4500) + 1000
    sub1.Visible = True
    End If
    sub1.Move sub1.Left - 20
    If sub1.Left + sub1.Width < (-1000) Then
    a = 0
    End If
    End If
    
    If j = 0 Then
    If sub10.Left + sub10.Width < (-1000) Then
    sub10.Top = (Rnd * 4500) + 1000
    sub10.Visible = True
    End If
    sub10.Move sub10.Left + 20
    If sub10.Left > 7500 Then
    j = 1
    End If
    End If
    
    If j = 1 Then
    If sub10.Left > 7500 Then
    sub10.Top = (Rnd * 4500) + 1000
    sub10.Visible = True
    End If
    sub10.Move sub10.Left - 20
    If sub10.Left + sub10.Width < (-1000) Then
    j = 0
    End If
    End If
    
    If b = 0 Then
    If sub2.Left + sub2.Width < (-1000) Then
    sub2.Top = (Rnd * 4500) + 1000
    sub2.Visible = True
    End If
    sub2.Move sub2.Left + 20
    If sub2.Left > 7500 Then
    b = 1
    End If
    End If
    
    If b = 1 Then
    If sub2.Left > 7500 Then
    sub2.Top = (Rnd * 4500) + 1000
    sub2.Visible = True
    End If
    sub2.Move sub2.Left - 20
    If sub2.Left + sub2.Width < (-1000) Then
    b = 0
    End If
    End If
    
    If c = 0 Then
    If sub3.Left + sub3.Width < (-1000) Then
    sub3.Top = (Rnd * 4500) + 1000
    sub3.Visible = True
    End If
    sub3.Move sub3.Left + 20
    If sub3.Left > 7500 Then
    c = 1
    End If
    End If
    
    If c = 1 Then
    If sub3.Left > 7500 Then
    sub3.Top = (Rnd * 4500) + 1000
    sub3.Visible = True
    End If
    sub3.Move sub3.Left - 20
    If sub3.Left + sub3.Width < (-1000) Then
    c = 0
    End If
    End If
    
    If d = 0 Then
    If sub4.Left + sub4.Width < (-1000) Then
    sub4.Top = (Rnd * 4500) + 1000
    sub4.Visible = True
    End If
    sub4.Move sub4.Left + 20
    If sub4.Left > 7500 Then
    d = 1
    End If
    End If
    
    If d = 1 Then
    If sub4.Left > 7500 Then
    sub4.Top = (Rnd * 4500) + 1000
    sub4.Visible = True
    End If
    sub4.Move sub4.Left - 20
    If sub4.Left + sub4.Width < (-1000) Then
    d = 0
    End If
    End If
    
    If e = 0 Then
    If sub5.Left + sub5.Width < (-1000) Then
    sub5.Top = (Rnd * 4500) + 1000
    sub5.Visible = True
    End If
    sub5.Move sub5.Left + 20
    If sub5.Left > 7500 Then
    e = 1
    End If
    End If
    
    If e = 1 Then
    If sub5.Left > 7500 Then
    sub5.Top = (Rnd * 4500) + 1000
    sub5.Visible = True
    End If
    sub5.Move sub5.Left - 20
    If sub5.Left + sub5.Width < (-1000) Then
    e = 0
    End If
    End If
    
    If f = 0 Then
    If sub6.Left + sub6.Width < (-1000) Then
    sub6.Top = (Rnd * 4500) + 1000
    sub6.Visible = True
    End If
    sub6.Move sub6.Left + 20
    If sub6.Left > 7500 Then
    f = 1
    End If
    End If
    
    If f = 1 Then
    If sub6.Left > 7500 Then
    sub6.Top = (Rnd * 4500) + 1000
    sub6.Visible = True
    End If
    sub6.Move sub6.Left - 20
    If sub6.Left + sub6.Width < (-1000) Then
    f = 0
    End If
    End If
    
    If g = 0 Then
    If sub7.Left + sub7.Width < (-1000) Then
    sub7.Top = (Rnd * 4500) + 1000
    sub7.Visible = True
    End If
    sub7.Move sub7.Left + 20
    If sub7.Left > 7500 Then
    g = 1
    End If
    End If
    
    If g = 1 Then
    If sub7.Left > 7500 Then
    sub7.Top = (Rnd * 4500) + 1000
    sub7.Visible = True
    End If
    sub7.Move sub7.Left - 20
    If sub7.Left + sub7.Width < (-1000) Then
    g = 0
    End If
    End If
    
    If h = 0 Then
    If sub8.Left + sub8.Width < (-1000) Then
    sub8.Top = (Rnd * 4500) + 1000
    sub8.Visible = True
    End If
    sub8.Move sub8.Left + 20
    If sub8.Left > 7500 Then
    h = 1
    End If
    End If
    
    If h = 1 Then
    If sub8.Left > 7500 Then
    sub8.Top = (Rnd * 4500) + 1000
    sub8.Visible = True
    End If
    sub8.Move sub8.Left - 20
    If sub8.Left + sub8.Width < (-1000) Then
    h = 0
    End If
    End If
    
    If i = 0 Then
    If sub9.Left + sub9.Width < (-1000) Then
    sub9.Top = (Rnd * 4500) + 1000
    sub9.Visible = True
    End If
    sub9.Move sub9.Left + 20
    If sub9.Left > 7500 Then
    i = 1
    End If
    End If
    
    If i = 1 Then
    If sub9.Left > 7500 Then
    sub9.Top = (Rnd * 4500) + 1000
    sub9.Visible = True
    End If
    sub9.Move sub9.Left - 20
    If sub9.Left + sub9.Width < (-1000) Then
    i = 0
    End If
    End If
    
    
    If sub1.Visible = True Then
    If Image1(0).Visible = True And Image1(0).Left > sub1.Left And Image1(0).Left < sub1.Left + sub1.Width And Image1(0).Top + Image1(0).Height > sub1.Top And Image1(0).Top + Image1(0).Height < sub1.Top + sub1.Height Then
    score = score + 10
    sub1.Visible = False
    Image1(0).Visible = False
    Image1(0).Top = 0
    bullets = bullets + 1
    End If
    If Image1(1).Visible = True And Image1(1).Left > sub1.Left And Image1(1).Left < sub1.Left + sub1.Width And Image1(1).Top + Image1(1).Height > sub1.Top And Image1(1).Top + Image1(1).Height < sub1.Top + sub1.Height Then
    score = score + 10
    sub1.Visible = False
    Image1(1).Visible = False
    Image1(1).Top = 0
    bullets = bullets + 1
    End If
    If Image1(2).Visible = True And Image1(2).Left > sub1.Left And Image1(2).Left < sub1.Left + sub1.Width And Image1(2).Top + Image1(2).Height > sub1.Top And Image1(2).Top + Image1(2).Height < sub1.Top + sub1.Height Then
    score = score + 10
    sub1.Visible = False
    Image1(2).Visible = False
    Image1(2).Top = 0
    bullets = bullets + 1
    End If
    If Image1(3).Visible = True And Image1(3).Left > sub1.Left And Image1(3).Left < sub1.Left + sub1.Width And Image1(3).Top + Image1(3).Height > sub1.Top And Image1(3).Top + Image1(3).Height < sub1.Top + sub1.Height Then
    score = score + 10
    sub1.Visible = False
    Image1(3).Visible = False
    Image1(3).Top = 0
    bullets = bullets + 1
    End If
    If Image1(4).Visible = True And Image1(4).Left > sub1.Left And Image1(4).Left < sub1.Left + sub1.Width And Image1(4).Top + Image1(4).Height > sub1.Top And Image1(4).Top + Image1(4).Height < sub1.Top + sub1.Height Then
    score = score + 10
    sub1.Visible = False
    Image1(4).Visible = False
    Image1(4).Top = 0
    bullets = bullets + 1
    End If
    End If
    
    If sub2.Visible = True Then
    If Image1(0).Visible = True And Image1(0).Left > sub2.Left And Image1(0).Left < sub2.Left + sub2.Width And Image1(0).Top + Image1(0).Height > sub2.Top And Image1(0).Top + Image1(0).Height < sub2.Top + sub2.Height Then
    score = score + 10
    sub2.Visible = False
    Image1(0).Visible = False
    Image1(0).Top = 0
    bullets = bullets + 1
    End If
    If Image1(1).Visible = True And Image1(1).Left > sub2.Left And Image1(1).Left < sub2.Left + sub2.Width And Image1(1).Top + Image1(1).Height > sub2.Top And Image1(1).Top + Image1(1).Height < sub2.Top + sub2.Height Then
    score = score + 10
    sub2.Visible = False
    Image1(1).Visible = False
    Image1(1).Top = 0
    bullets = bullets + 1
    End If
    If Image1(2).Visible = True And Image1(2).Left > sub2.Left And Image1(2).Left < sub2.Left + sub2.Width And Image1(2).Top + Image1(2).Height > sub2.Top And Image1(2).Top + Image1(2).Height < sub2.Top + sub2.Height Then
    score = score + 10
    sub2.Visible = False
    Image1(2).Visible = False
    Image1(2).Top = 0
    bullets = bullets + 1
    End If
    If Image1(3).Visible = True And Image1(3).Left > sub2.Left And Image1(3).Left < sub2.Left + sub2.Width And Image1(3).Top + Image1(3).Height > sub2.Top And Image1(3).Top + Image1(3).Height < sub2.Top + sub2.Height Then
    score = score + 10
    sub2.Visible = False
    Image1(3).Visible = False
    Image1(3).Top = 0
    bullets = bullets + 1
    End If
    If Image1(4).Visible = True And Image1(4).Left > sub2.Left And Image1(4).Left < sub2.Left + sub2.Width And Image1(4).Top + Image1(4).Height > sub2.Top And Image1(4).Top + Image1(4).Height < sub2.Top + sub2.Height Then
    score = score + 10
    sub2.Visible = False
    Image1(4).Visible = False
    Image1(4).Top = 0
    bullets = bullets + 1
    End If
    End If
    
    If sub3.Visible = True Then
    If Image1(0).Visible = True And Image1(0).Left > sub3.Left And Image1(0).Left < sub3.Left + sub3.Width And Image1(0).Top + Image1(0).Height > sub3.Top And Image1(0).Top + Image1(0).Height < sub3.Top + sub3.Height Then
    score = score + 10
    sub3.Visible = False
    Image1(0).Visible = False
    Image1(0).Top = 0
    bullets = bullets + 1
    End If
    If Image1(1).Visible = True And Image1(1).Left > sub3.Left And Image1(1).Left < sub3.Left + sub3.Width And Image1(1).Top + Image1(1).Height > sub3.Top And Image1(1).Top + Image1(1).Height < sub3.Top + sub3.Height Then
    score = score + 10
    sub3.Visible = False
    Image1(1).Visible = False
    Image1(1).Top = 0
    bullets = bullets + 1
    End If
    If Image1(2).Visible = True And Image1(2).Left > sub3.Left And Image1(2).Left < sub3.Left + sub3.Width And Image1(2).Top + Image1(2).Height > sub3.Top And Image1(2).Top + Image1(2).Height < sub3.Top + sub3.Height Then
    score = score + 10
    sub3.Visible = False
    Image1(2).Visible = False
    Image1(2).Top = 0
    bullets = bullets + 1
    End If
    If Image1(3).Visible = True And Image1(3).Left > sub3.Left And Image1(3).Left < sub3.Left + sub3.Width And Image1(3).Top + Image1(3).Height > sub3.Top And Image1(3).Top + Image1(3).Height < sub3.Top + sub3.Height Then
    score = score + 10
    sub3.Visible = False
    Image1(3).Visible = False
    Image1(3).Top = 0
    bullets = bullets + 1
    End If
    If Image1(4).Visible = True And Image1(4).Left > sub3.Left And Image1(4).Left < sub3.Left + sub3.Width And Image1(4).Top + Image1(4).Height > sub3.Top And Image1(4).Top + Image1(4).Height < sub3.Top + sub3.Height Then
    score = score + 10
    sub3.Visible = False
    Image1(4).Visible = False
    Image1(4).Top = 0
    bullets = bullets + 1
    End If
    End If
    
    If sub4.Visible = True Then
    If Image1(0).Visible = True And Image1(0).Left > sub4.Left And Image1(0).Left < sub4.Left + sub4.Width And Image1(0).Top + Image1(0).Height > sub4.Top And Image1(0).Top + Image1(0).Height < sub4.Top + sub4.Height Then
    score = score + 10
    sub4.Visible = False
    Image1(0).Visible = False
    Image1(0).Top = 0
    bullets = bullets + 1
    End If
    If Image1(1).Visible = True And Image1(1).Left > sub4.Left And Image1(1).Left < sub4.Left + sub4.Width And Image1(1).Top + Image1(1).Height > sub4.Top And Image1(1).Top + Image1(1).Height < sub4.Top + sub4.Height Then
    score = score + 10
    sub4.Visible = False
    Image1(1).Visible = False
    Image1(1).Top = 0
    bullets = bullets + 1
    End If
    If Image1(2).Visible = True And Image1(2).Left > sub4.Left And Image1(2).Left < sub4.Left + sub4.Width And Image1(2).Top + Image1(2).Height > sub4.Top And Image1(2).Top + Image1(2).Height < sub4.Top + sub4.Height Then
    score = score + 10
    sub4.Visible = False
    Image1(2).Visible = False
    Image1(2).Top = 0
    bullets = bullets + 1
    End If
    If Image1(3).Visible = True And Image1(3).Left > sub4.Left And Image1(3).Left < sub4.Left + sub4.Width And Image1(3).Top + Image1(3).Height > sub4.Top And Image1(3).Top + Image1(3).Height < sub4.Top + sub4.Height Then
    score = score + 10
    sub4.Visible = False
    Image1(3).Visible = False
    Image1(3).Top = 0
    bullets = bullets + 1
    End If
    If Image1(4).Visible = True And Image1(4).Left > sub4.Left And Image1(4).Left < sub4.Left + sub4.Width And Image1(4).Top + Image1(4).Height > sub4.Top And Image1(4).Top + Image1(4).Height < sub4.Top + sub4.Height Then
    score = score + 10
    sub4.Visible = False
    Image1(4).Visible = False
    Image1(4).Top = 0
    bullets = bullets + 1
    End If
    End If
    
    If sub5.Visible = True Then
    If Image1(0).Visible = True And Image1(0).Left > sub5.Left And Image1(0).Left < sub5.Left + sub5.Width And Image1(0).Top + Image1(0).Height > sub5.Top And Image1(0).Top + Image1(0).Height < sub5.Top + sub5.Height Then
    score = score + 10
    sub5.Visible = False
    Image1(0).Visible = False
    Image1(0).Top = 0
    bullets = bullets + 1
    End If
    If Image1(1).Visible = True And Image1(1).Left > sub5.Left And Image1(1).Left < sub5.Left + sub5.Width And Image1(1).Top + Image1(1).Height > sub5.Top And Image1(1).Top + Image1(1).Height < sub5.Top + sub5.Height Then
    score = score + 10
    sub5.Visible = False
    Image1(1).Visible = False
    Image1(1).Top = 0
    bullets = bullets + 1
    End If
    If Image1(2).Visible = True And Image1(2).Left > sub5.Left And Image1(2).Left < sub5.Left + sub5.Width And Image1(2).Top + Image1(2).Height > sub5.Top And Image1(2).Top + Image1(2).Height < sub5.Top + sub5.Height Then
    score = score + 10
    sub5.Visible = False
    Image1(2).Visible = False
    Image1(2).Top = 0
    bullets = bullets + 1
    End If
    If Image1(3).Visible = True And Image1(3).Left > sub5.Left And Image1(3).Left < sub5.Left + sub5.Width And Image1(3).Top + Image1(3).Height > sub5.Top And Image1(3).Top + Image1(3).Height < sub5.Top + sub5.Height Then
    score = score + 10
    sub5.Visible = False
    Image1(3).Visible = False
    Image1(3).Top = 0
    bullets = bullets + 1
    End If
    If Image1(4).Visible = True And Image1(4).Left > sub5.Left And Image1(4).Left < sub5.Left + sub5.Width And Image1(4).Top + Image1(4).Height > sub5.Top And Image1(4).Top + Image1(4).Height < sub5.Top + sub5.Height Then
    score = score + 10
    sub5.Visible = False
    Image1(4).Visible = False
    Image1(4).Top = 0
    bullets = bullets + 1
    End If
    End If
    
    If sub6.Visible = True Then
    If Image1(0).Visible = True And Image1(0).Left > sub6.Left And Image1(0).Left < sub6.Left + sub6.Width And Image1(0).Top + Image1(0).Height > sub6.Top And Image1(0).Top + Image1(0).Height < sub6.Top + sub6.Height Then
    score = score + 10
    sub6.Visible = False
    Image1(0).Visible = False
    Image1(0).Top = 0
    bullets = bullets + 1
    End If
    If Image1(1).Visible = True And Image1(1).Left > sub6.Left And Image1(1).Left < sub6.Left + sub6.Width And Image1(1).Top + Image1(1).Height > sub6.Top And Image1(1).Top + Image1(1).Height < sub6.Top + sub6.Height Then
    score = score + 10
    sub6.Visible = False
    Image1(1).Visible = False
    Image1(1).Top = 0
    bullets = bullets + 1
    End If
    If Image1(2).Visible = True And Image1(2).Left > sub6.Left And Image1(2).Left < sub6.Left + sub6.Width And Image1(2).Top + Image1(2).Height > sub6.Top And Image1(2).Top + Image1(2).Height < sub6.Top + sub6.Height Then
    score = score + 10
    sub6.Visible = False
    Image1(2).Visible = False
    Image1(2).Top = 0
    bullets = bullets + 1
    End If
    If Image1(3).Visible = True And Image1(3).Left > sub6.Left And Image1(3).Left < sub6.Left + sub6.Width And Image1(3).Top + Image1(3).Height > sub6.Top And Image1(3).Top + Image1(3).Height < sub6.Top + sub6.Height Then
    score = score + 10
    sub6.Visible = False
    Image1(3).Visible = False
    Image1(3).Top = 0
    bullets = bullets + 1
    End If
    If Image1(4).Visible = True And Image1(4).Left > sub6.Left And Image1(4).Left < sub6.Left + sub6.Width And Image1(4).Top + Image1(4).Height > sub6.Top And Image1(4).Top + Image1(4).Height < sub6.Top + sub6.Height Then
    score = score + 10
    sub6.Visible = False
    Image1(4).Visible = False
    Image1(4).Top = 0
    bullets = bullets + 1
    End If
    End If
    
    If sub7.Visible = True Then
    If Image1(0).Visible = True And Image1(0).Left > sub7.Left And Image1(0).Left < sub7.Left + sub7.Width And Image1(0).Top + Image1(0).Height > sub7.Top And Image1(0).Top + Image1(0).Height < sub7.Top + sub7.Height Then
    score = score + 10
    sub7.Visible = False
    Image1(0).Visible = False
    Image1(0).Top = 0
    bullets = bullets + 1
    End If
    If Image1(1).Visible = True And Image1(1).Left > sub7.Left And Image1(1).Left < sub7.Left + sub7.Width And Image1(1).Top + Image1(1).Height > sub7.Top And Image1(1).Top + Image1(1).Height < sub7.Top + sub7.Height Then
    score = score + 10
    sub7.Visible = False
    Image1(1).Visible = False
    Image1(1).Top = 0
    bullets = bullets + 1
    End If
    If Image1(2).Visible = True And Image1(2).Left > sub7.Left And Image1(2).Left < sub7.Left + sub7.Width And Image1(2).Top + Image1(2).Height > sub7.Top And Image1(2).Top + Image1(2).Height < sub7.Top + sub7.Height Then
    score = score + 10
    sub7.Visible = False
    Image1(2).Visible = False
    Image1(2).Top = 0
    bullets = bullets + 1
    End If
    If Image1(3).Visible = True And Image1(3).Left > sub7.Left And Image1(3).Left < sub7.Left + sub7.Width And Image1(3).Top + Image1(3).Height > sub7.Top And Image1(3).Top + Image1(3).Height < sub7.Top + sub7.Height Then
    score = score + 10
    sub7.Visible = False
    Image1(3).Visible = False
    Image1(3).Top = 0
    bullets = bullets + 1
    End If
    If Image1(4).Visible = True And Image1(4).Left > sub7.Left And Image1(4).Left < sub7.Left + sub7.Width And Image1(4).Top + Image1(4).Height > sub7.Top And Image1(4).Top + Image1(4).Height < sub7.Top + sub7.Height Then
    score = score + 10
    sub7.Visible = False
    Image1(4).Visible = False
    Image1(4).Top = 0
    bullets = bullets + 1
    End If
    End If
    
    If sub8.Visible = True Then
    If Image1(0).Visible = True And Image1(0).Left > sub8.Left And Image1(0).Left < sub8.Left + sub8.Width And Image1(0).Top + Image1(0).Height > sub8.Top And Image1(0).Top + Image1(0).Height < sub8.Top + sub8.Height Then
    score = score + 10
    sub8.Visible = False
    Image1(0).Visible = False
    Image1(0).Top = 0
    bullets = bullets + 1
    End If
    If Image1(1).Visible = True And Image1(1).Left > sub8.Left And Image1(1).Left < sub8.Left + sub8.Width And Image1(1).Top + Image1(1).Height > sub8.Top And Image1(1).Top + Image1(1).Height < sub8.Top + sub8.Height Then
    score = score + 10
    sub8.Visible = False
    Image1(1).Visible = False
    Image1(1).Top = 0
    bullets = bullets + 1
    End If
    If Image1(2).Visible = True And Image1(2).Left > sub8.Left And Image1(2).Left < sub8.Left + sub8.Width And Image1(2).Top + Image1(2).Height > sub8.Top And Image1(2).Top + Image1(2).Height < sub8.Top + sub8.Height Then
    score = score + 10
    sub8.Visible = False
    Image1(2).Visible = False
    Image1(2).Top = 0
    bullets = bullets + 1
    End If
    If Image1(3).Visible = True And Image1(3).Left > sub8.Left And Image1(3).Left < sub8.Left + sub8.Width And Image1(3).Top + Image1(3).Height > sub8.Top And Image1(3).Top + Image1(3).Height < sub8.Top + sub8.Height Then
    score = score + 10
    sub8.Visible = False
    Image1(3).Visible = False
    Image1(3).Top = 0
    bullets = bullets + 1
    End If
    If Image1(4).Visible = True And Image1(4).Left > sub8.Left And Image1(4).Left < sub8.Left + sub8.Width And Image1(4).Top + Image1(4).Height > sub8.Top And Image1(4).Top + Image1(4).Height < sub8.Top + sub8.Height Then
    score = score + 10
    sub8.Visible = False
    Image1(4).Visible = False
    Image1(4).Top = 0
    bullets = bullets + 1
    End If
    End If
    
    If sub9.Visible = True Then
    If Image1(0).Visible = True And Image1(0).Left > sub9.Left And Image1(0).Left < sub9.Left + sub9.Width And Image1(0).Top + Image1(0).Height > sub9.Top And Image1(0).Top + Image1(0).Height < sub9.Top + sub9.Height Then
    score = score + 10
    sub9.Visible = False
    Image1(0).Visible = False
    Image1(0).Top = 0
    bullets = bullets + 1
    End If
    If Image1(1).Visible = True And Image1(1).Left > sub9.Left And Image1(1).Left < sub9.Left + sub9.Width And Image1(1).Top + Image1(1).Height > sub9.Top And Image1(1).Top + Image1(1).Height < sub9.Top + sub9.Height Then
    score = score + 10
    sub9.Visible = False
    Image1(1).Visible = False
    Image1(1).Top = 0
    bullets = bullets + 1
    End If
    If Image1(2).Visible = True And Image1(2).Left > sub9.Left And Image1(2).Left < sub9.Left + sub9.Width And Image1(2).Top + Image1(2).Height > sub9.Top And Image1(2).Top + Image1(2).Height < sub9.Top + sub9.Height Then
    score = score + 10
    sub9.Visible = False
    Image1(2).Visible = False
    Image1(2).Top = 0
    bullets = bullets + 1
    End If
    If Image1(3).Visible = True And Image1(3).Left > sub9.Left And Image1(3).Left < sub9.Left + sub9.Width And Image1(3).Top + Image1(3).Height > sub9.Top And Image1(3).Top + Image1(3).Height < sub9.Top + sub9.Height Then
    score = score + 10
    sub9.Visible = False
    Image1(3).Visible = False
    Image1(3).Top = 0
    bullets = bullets + 1
    End If
    If Image1(4).Visible = True And Image1(4).Left > sub9.Left And Image1(4).Left < sub9.Left + sub9.Width And Image1(4).Top + Image1(4).Height > sub9.Top And Image1(4).Top + Image1(4).Height < sub9.Top + sub9.Height Then
    score = score + 10
    sub9.Visible = False
    Image1(4).Visible = False
    Image1(4).Top = 0
    bullets = bullets + 1
    End If
    End If
    
    If sub10.Visible = True Then
    If Image1(0).Visible = True And Image1(0).Left > sub10.Left And Image1(0).Left < sub10.Left + sub10.Width And Image1(0).Top + Image1(0).Height > sub10.Top And Image1(0).Top + Image1(0).Height < sub10.Top + sub10.Height Then
    score = score + 10
    sub10.Visible = False
    Image1(0).Visible = False
    Image1(0).Top = 0
    bullets = bullets + 1
    End If
    If Image1(1).Visible = True And Image1(1).Left > sub10.Left And Image1(1).Left < sub10.Left + sub10.Width And Image1(1).Top + Image1(1).Height > sub10.Top And Image1(1).Top + Image1(1).Height < sub10.Top + sub10.Height Then
    score = score + 10
    sub10.Visible = False
    Image1(1).Visible = False
    Image1(1).Top = 0
    bullets = bullets + 1
    End If
    If Image1(2).Visible = True And Image1(2).Left > sub10.Left And Image1(2).Left < sub10.Left + sub10.Width And Image1(2).Top + Image1(2).Height > sub10.Top And Image1(2).Top + Image1(2).Height < sub10.Top + sub10.Height Then
    score = score + 10
    sub10.Visible = False
    Image1(2).Visible = False
    Image1(2).Top = 0
    bullets = bullets + 1
    End If
    If Image1(3).Visible = True And Image1(3).Left > sub10.Left And Image1(3).Left < sub10.Left + sub10.Width And Image1(3).Top + Image1(3).Height > sub10.Top And Image1(3).Top + Image1(3).Height < sub10.Top + sub10.Height Then
    score = score + 10
    sub10.Visible = False
    Image1(3).Visible = False
    Image1(3).Top = 0
    bullets = bullets + 1
    End If
    If Image1(4).Visible = True And Image1(4).Left > sub10.Left And Image1(4).Left < sub10.Left + sub10.Width And Image1(4).Top + Image1(4).Height > sub10.Top And Image1(4).Top + Image1(4).Height < sub10.Top + sub10.Height Then
    score = score + 10
    sub10.Visible = False
    Image1(4).Visible = False
    Image1(4).Top = 0
    bullets = bullets + 1
    End If
    End If
    
    
    Label1.Caption = "Bullets Left: " & bullets
    Label2.Caption = "Score: " & score
    
    If Image1(0).Visible = True Then
    Image1(0).Move Image1(0).Left + 0, Image1(0).Top + 20
    If Image1(0).Top > 6200 Then
    Image1(0).Visible = False
    Image1(0).Top = 0
    bullets = bullets + 1
    End If
    End If
    
    If Image1(1).Visible = True Then
    Image1(1).Move Image1(1).Left + 0, Image1(1).Top + 20
    If Image1(1).Top > 6200 Then
    Image1(1).Visible = False
    Image1(1).Top = 0
    bullets = bullets + 1
    End If
    End If
    
    If Image1(2).Visible = True Then
    Image1(2).Move Image1(2).Left + 0, Image1(2).Top + 20
    If Image1(2).Top > 6200 Then
    Image1(2).Visible = False
    Image1(2).Top = 0
    bullets = bullets + 1
    End If
    End If
    
    If Image1(3).Visible = True Then
    Image1(3).Move Image1(3).Left + 0, Image1(3).Top + 20
    If Image1(3).Top > 6200 Then
    Image1(3).Visible = False
    Image1(3).Top = 0
    bullets = bullets + 1
    End If
    End If
    
    If Image1(4).Visible = True Then
    Image1(4).Move Image1(4).Left + 0, Image1(4).Top + 20
    If Image1(4).Top > 6200 Then
    Image1(4).Visible = False
    Image1(4).Top = 0
    bullets = bullets + 1
    End If
    End If
    
    Label3.Caption = "1: " & Image1(0).Left & "," & Image1(0).Top & " 2: " & Image1(1).Left & "," & Image1(1).Top & " 3: " & Image1(2).Left & "," & Image1(2).Top & " 4: " & Image1(3).Left & "," & Image1(3).Top & " 5: " & Image1(4).Left & "," & Image1(4).Top
    End Sub
    Sincerely,
    Chris


    Email: dark_wanderer13@hotmail.com
    AIM: KnightsOfTheMoon
    WebPage: http://kom.wicre.com
    ----------------
    VB6 Professional
    Abit ST6-RAID
    1000 MHZ
    512 MB PC133 Ram
    Nvidia GeForce 2 Ultra 64 MB
    Maxtor 81.9 Gig
    Win 98 SE

  2. #2

    Thread Starter
    Hyperactive Member PITBULLCJR's Avatar
    Join Date
    Nov 1999
    Location
    New York
    Posts
    408

    Talking

    Does anyone have any idea on what the heck is going on. I don't please someone help me. If you want an exe or the form just ask please ask.
    Sincerely,
    Chris


    Email: dark_wanderer13@hotmail.com
    AIM: KnightsOfTheMoon
    WebPage: http://kom.wicre.com
    ----------------
    VB6 Professional
    Abit ST6-RAID
    1000 MHZ
    512 MB PC133 Ram
    Nvidia GeForce 2 Ultra 64 MB
    Maxtor 81.9 Gig
    Win 98 SE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width