|
-
May 5th, 2012, 02:06 AM
#1
Thread Starter
New Member
Attacking creatures?
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
-
May 5th, 2012, 02:11 AM
#2
Re: Attacking creatures?
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?
-
May 5th, 2012, 03:46 AM
#3
Lively Member
Re: Attacking creatures?
wasn't it should be some event that similar to "click" event?
-
May 5th, 2012, 04:17 AM
#4
Re: Attacking creatures?
Moved to the Games and Graphics forum.
-
May 5th, 2012, 11:15 AM
#5
Re: Attacking creatures?
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.
-
May 19th, 2012, 01:50 AM
#6
Thread Starter
New Member
Re: Attacking creatures?
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
-
May 19th, 2012, 10:50 AM
#7
Re: Attacking creatures?
 Originally Posted by jackchay
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|