VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



UFO 0.5: An alien invasion game where you are the alien. Control a UFO and ubduct as many people as

by Alien (1 Submission)
Category: Games
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 12th June 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

UFO 0.5: An alien invasion game where you are the alien. Control a UFO and ubduct as many people as you can. But there is a problem with your

API Declarations


Dim CLine As Integer
Dim score As Integer

Rate UFO 0.5: An alien invasion game where you are the alien. Control a UFO and ubduct as many people as



Cl.Visible = False
CLine = 0
score = 0
End Sub


Private Sub Form_Keydown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyUp Then
UFO.Top = UFO.Top - 75
Cl.Top = Cl.Top - 75

End If

If KeyCode = vbKeyDown Then
UFO.Top = UFO.Top + 75
Cl.Top = Cl.Top + 75



End If

If KeyCode = vbKeyLeft Then
UFO.Left = UFO.Left - 75
Cl.Left = Cl.Left - 75

End If

If KeyCode = vbKeyRight Then
UFO.Left = UFO.Left + 75
Cl.Left = Cl.Left + 75

End If

If KeyCode = vbKeySpace Then
Cl.Visible = True
For i = 0 To 3


Next i
End If

 

End Sub






Private Sub People1_Timer()
For i = 0 To 8
Person1(i).Left = Person1(i).Left + 100
If Person1(i).Left > Form1.Width Then
Person1(i).Left = 0 - Person1(i).Width
End If
Next i




End Sub



Private Sub Cltimer_Timer()


For i = 0 To 3
If Abs(Cl.Left + 100 - Person1(i).Left) < 250 And Cl.Visible Then
Person1(i).Top = Person1(i).Top - 2000
End If
If Person1(i).Top < 7070 Then
    Person1(i).Top = Person1(i).Top + 75

End If

If Person1(i).Top > 7080 Then
    Person1(i).Visible = False
End If
If Abs(Person1(i).Top - 100 - UFO.Top) < 250 Then
Person1(i).Visible = False
score = score + 1
End If
Next i
Cl.Visible = False
End Sub




Private Sub Form_Keydown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyUp Then
UFO.Top = UFO.Top - 75
Cl.Top = Cl.Top - 75

End If

If KeyCode = vbKeyDown Then
UFO.Top = UFO.Top + 75
Cl.Top = Cl.Top + 75



End If

If KeyCode = vbKeyLeft Then
UFO.Left = UFO.Left - 75
Cl.Left = Cl.Left - 75

End If

If KeyCode = vbKeyRight Then
UFO.Left = UFO.Left + 75
Cl.Left = Cl.Left + 75

End If

If KeyCode = vbKeySpace Then
Cl.Visible = True
For i = 0 To 3


Next i
End If

 

End Sub






Private Sub People1_Timer()
For i = 0 To 8
Person1(i).Left = Person1(i).Left + 100
If Person1(i).Left > Form1.Width Then
Person1(i).Left = 0 - Person1(i).Width
End If
Next i




End Sub



Private Sub Cltimer_Timer()


For i = 0 To 3
If Abs(Cl.Left + 100 - Person1(i).Left) < 250 And Cl.Visible Then
Person1(i).Top = Person1(i).Top - 2000
End If
If Person1(i).Top < 7070 Then
    Person1(i).Top = Person1(i).Top + 75

End If

If Person1(i).Top > 7080 Then
    Person1(i).Visible = False
End If
If Abs(Person1(i).Top - 100 - UFO.Top) < 250 Then
Person1(i).Visible = False
score = score + 1
End If
Next i
Cl.Visible = False
End Sub







  






  





Download this snippet    Add to My Saved Code

UFO 0.5: An alien invasion game where you are the alien. Control a UFO and ubduct as many people as Comments

No comments have been posted about UFO 0.5: An alien invasion game where you are the alien. Control a UFO and ubduct as many people as. Why not be the first to post a comment about UFO 0.5: An alien invasion game where you are the alien. Control a UFO and ubduct as many people as.

Post your comment

Subject:
Message:
0/1000 characters