Results 1 to 7 of 7

Thread: Attacking creatures?

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2012
    Posts
    6

    Exclamation 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

  2. #2
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,401

    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?

  3. #3
    Lively Member chipp's Avatar
    Join Date
    May 2012
    Posts
    78

    Re: Attacking creatures?

    wasn't it should be some event that similar to "click" event?

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Attacking creatures?

    Moved to the Games and Graphics forum.

  5. #5
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    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.

  6. #6

    Thread Starter
    New Member
    Join Date
    Apr 2012
    Posts
    6

    Exclamation 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

  7. #7
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: Attacking creatures?

    Quote Originally Posted by jackchay View Post
    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
  •  



Click Here to Expand Forum to Full Width