Results 1 to 7 of 7

Thread: Attacking creatures?

Hybrid View

  1. #1
    New Member
    Join Date
    Apr 12
    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
    Fanatic Member ident's Avatar
    Join Date
    Mar 09
    Location
    Cambridge
    Posts
    1,008

    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
    Member chipp's Avatar
    Join Date
    May 12
    Posts
    35

    Re: Attacking creatures?

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

  4. #4
    Super Moderator Joacim Andersson's Avatar
    Join Date
    Jan 99
    Location
    Sweden
    Posts
    13,421

    Re: Attacking creatures?

    Moved to the Games and Graphics forum.
    Joacim Andersson
    Microsoft MVP, MCSD, MCSE, Sun Certified Java Programmer
    If anyone's answer has helped you, please show your appreciation by rating that answer.
    I'd rather run ScriptBrix...
    Joacim's view on stuff.

  5. #5
    The DirectXpert Jacob Roman's Avatar
    Join Date
    Aug 04
    Location
    Miami Beach, FL
    Posts
    4,835

    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.
    Useful Forum Tips:

    - If you found any post that was useful, please consider rating their post

    - Give sensible thread titles, please!
    - Be sure to use [HIGHLIGHT=VB][/HIGHLIGHT] tags when posting code written in VB.
    - Write posts like a conversation, not like an email. That way you can avoid saying "Dear so and so" in every post.
    - When your problem is solved, go up to Thread Tools and click on Mark Thread Resolved

    My Contributions: Massive DirectX 2D Tutorials For VB5/VB6/VB.NET || 3D Engine In Pure VB || Friction Force ||DJ Turntable Simulation || Scratching Wavs || Time Based Movement || Newton Physics Simulation || Managed Game Loop || Rigid Body Collision Detection || World of Warcraft RGB Battle System || Bosskillers (World of Warcraft 2D Clone) || Street Fighter Controls (Flawless Simulation) || A* Pathfinding (VB6 & VB.NET) *UPDATED || *NEW* Nintendo Entertainment System Emulator

    Expert. Ask me anything NES!

    My Smilies:


  6. #6
    New Member
    Join Date
    Apr 12
    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
    The DirectXpert Jacob Roman's Avatar
    Join Date
    Aug 04
    Location
    Miami Beach, FL
    Posts
    4,835

    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.
    Useful Forum Tips:

    - If you found any post that was useful, please consider rating their post

    - Give sensible thread titles, please!
    - Be sure to use [HIGHLIGHT=VB][/HIGHLIGHT] tags when posting code written in VB.
    - Write posts like a conversation, not like an email. That way you can avoid saying "Dear so and so" in every post.
    - When your problem is solved, go up to Thread Tools and click on Mark Thread Resolved

    My Contributions: Massive DirectX 2D Tutorials For VB5/VB6/VB.NET || 3D Engine In Pure VB || Friction Force ||DJ Turntable Simulation || Scratching Wavs || Time Based Movement || Newton Physics Simulation || Managed Game Loop || Rigid Body Collision Detection || World of Warcraft RGB Battle System || Bosskillers (World of Warcraft 2D Clone) || Street Fighter Controls (Flawless Simulation) || A* Pathfinding (VB6 & VB.NET) *UPDATED || *NEW* Nintendo Entertainment System Emulator

    Expert. Ask me anything NES!

    My Smilies:


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •