Jump to content

Recommended Posts

Posted

There are many places in my game where the character could fall from a high place to what in real life would mean death or severe injury.

Is there a way I can implement this whereever it occurs in the game in the same bit of code?

 

I know how to impement it in specific places but there are too many places it could occur to make that method feasible.

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Posted

I think this came up in another thread but I forget how it was resolved. The simplest may be just to check the Y velocity (I believe). If it's 0 (or close) and last frame it was a large negative, kill or injure the player accordingly.

Posted

you could have a boolean that checks whether character is on the ground or not, whenever this character is not on the ground you can start a timer, if the character comes in contact with the ground after a certain amount of time you should subtract someHPvalue * amount of time airborne

Core I5 2.67 / 16GB RAM / GTX 670

Zbrush/ Blender / Photoshop CS6 / Renoise / Genetica / Leadwerks 3

Posted

Yeah there are all sorts of pitfalls to solving this prob.If you don;t think it out you can create other problems.

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...