Hi, i'm planning on making a game where when the character touches a certain object, it will be game over. Is there a certain code for this?
Thanks in advance :)
Printable View
Hi, i'm planning on making a game where when the character touches a certain object, it will be game over. Is there a certain code for this?
Thanks in advance :)
Unfortunately Visual Basic does not have a game control you can drag and drop onto your form that will magically know it's been touched and alert the user it is game over. Maybe you could provide us with more information first?
wasn't it should be some event that similar to "click" event?
Moved to the Games and Graphics forum.
Wow guys. Obviously this guy is looking for "Collision Detection." Take a look at my Bosskillers game in my sig, or even A* Pathfinding as well as Rigid Body Collision Detection, which also is located in my signature.
so like for example a flying bat in the game... the character hits into it while walking and dies... how do I make the game over screen page appear, directly after the player touches the flying bat?
thanks in advance :)
Like I said in the post above. Look in my sig for code examples of "Collision Detection" which are written in vb6. I have lots of em. If you are using vb.net, you can easily convert the code. I tend to do that converting c++ or c# samples to vb6 and vb.net. If the collision is true it'll do whats called "Collision Response" and you can do whatever you want with it then such as stopping the character from moving, subtracting a life, game over screen, lowering health in a health bar, etc. For the game over screen just use a simple boolean variable. If Gameover = true then pop up the game over logo.