HTML:
If (Shot.Top + Shot.Height >= Enemy1.Top) And (Shot.Top <= Enemy1.Top + Enemy1.Height) And (Shot.Left + Shot.Width >= Enemy1.Left) And (Shot.Left <= Enemy1.Left + Enemy1.Width) And Shot.Visible = True Then
Enemy1.Visible = True
LBLSCORE.Text = Val(LBLSCORE.Text) + 20
Shot.Visible = False
Shot.Left = 5000
Enemy1.Left = -100
Enemy1.Visible = True
End If
If (Missile.Top + Missile.Height >= Enemy1.Top) And (Missile.Top <= Enemy1.Top + Enemy1.Height) And (Missile.Left + Missile.Width >= Enemy1.Left) And (Missile.Left <= Enemy1.Left + Enemy1.Width) And Enemy1.Visible = True Then
Enemy1.Visible = False
LBLSCORE.Text = Val(LBLSCORE.Text) + 25
Missile.Visible = False
Enemy1.Left = -100
Enemy1.Visible = True
End If
This is the code I have for the game, I am making but there's a problem. The enemy disappears without being shot.
There are 9 enemies moving from left to right. When one is shot, about 3 other disappear with it and on the second loop they keep disappearing.
Help!
Last edited: