So, I've created this game and I am finishing off the last stage of this game and I wanted to make the last stage difficult so I positioned the shooter to the left side of the form, because I wanted to give it an up and down movements. I've tried and tried but I still couldn't get it right so I came here for help.
The enemies I also have, move from left to right and they're cool but I wanted to add a function to make them drop missiles at random.
Anyone know how I can do that (BTW this is what I meant by random events)
Private Sub Utility_KeyDown(sender As System.Object, e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown 'this code moves the Renegade to the right' If e.KeyValue = Keys.Up Then RRight = True End If If e.KeyValue = Keys.Down Then RLeft = True RRight = False End If 'this code moves the Collider to the right' If e.KeyValue = Keys.W Then CRight = True CLeft = False End If If e.KeyValue = Keys.S Then CLeft = True CRight = False End If End Sub Private Sub Utility_KeyUp(sender As System.Object, e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp 'this code moves the Renegade left or right' If e.KeyValue = Keys.Up Then RRight = False End If If e.KeyValue = Keys.Down Then RLeft = False End If 'this code moves the Collider left or right' If e.KeyValue = Keys.W Then CRight = False End If If e.KeyValue = Keys.S Then CLeft = False End If End Sub Private Sub MoveRenegade() 'this code moves the Renegade' If RRight = True And Renegade.Right + Renegade.Height < Me.ClientRectangle.Height Then Renegade.Height += RenegadeSpeed End If If RLeft = True And Renegade.Width > Me.ClientRectangle.Height Then Renegade.Height -= RenegadeSpeed End If End Sub
The enemies I also have, move from left to right and they're cool but I wanted to add a function to make them drop missiles at random.
Anyone know how I can do that (BTW this is what I meant by random events)