View Single Post
Old 12-15-2013, 01:06 PM
Chazz85 Chazz85 is offline
Join Date: Dec 2013
Posts: 10

Ok heres my best guess
If (player.Top + player.Height >= picturebox.Top) And (player.Top <= picturebox.Top + player.Height) And (palyer.Left + .Width >= picturebox.Left) And (player.Left <= picturebox.Left + player.Width) And player.Visible = True And picturebox.Visible = Then
player.Visible = False

MessageBox.Show(" ")
End If
Ok that code should detect if you wall contacts your player on all 4 sides if it doesn't work my bad it's been taken from my space invaders game. Were the shot makes contact with the invader killing it. So ignore any (x) thats for a array. So yeah it does the following
1)Detects the walls on all 4 sides
2)Makes player Visible false if he makes contact with the walls
3)Stops the main game or player or all timers if you em
4) Dislays lose game message box
So that should work
If not sorry for waisting your time and listen to the mod if this doesn't work he is 10 X's better then me.
Reply With Quote