Specific Body Damage

Discussion in 'Plugin Requests' started by flxnt, Dec 28, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    flxnt

    I would need a plugin that the parts you hit would take damage off, for example if you hit the head instead of taking armor damage off of the chestplate, pants, and boots it only takes damage off of the helment. Also Hitting the head does more damage than hitting chest, legs, and arms. I will pay if this is not already a plugin.
     
  2. Offline

    SpeedPotion

    I don't think you can detect it, although I might be wrong!
     
  3. Offline

    Alexondrou

    I have doubts that a plugin can detect which part of the body is being hit. It could be possible with the usage of ghost arms/legs/body/head always where the real parts are and those modify damage to armor/health but it would be very difficult. A mod would be much easier.

    I'm not a developer, I'm just stating a theory of how it could be done as far as my imagination goes. If doing what I suggested isn't possible please don't quote me.
     
  4. Offline

    Max8801

    You actually could. That's a simple mathematical problem: You have a vector (the direction the attacker is looking), a starting point of that vector (the attacker's eye location) and a vertical plane that goes right through the attacked player. Then you'd have to calculate the intersection of the plane ant the line you're left with and take its y-value. Based on the location and the height of the attacked player, you could determine which part of their body was hit.

    EDIT: As nobody else seems to be interested in making this, I will take over your request. Should be done in an hour or so.

    EDIT 2: @flxnt @SpeedPotion Alright, I'm done. You can download the plugin from my Dropbox. If you have any questions/issues/requests, feel free to post them here. If anyone is interested in the mathematical part, feel free to look at the little util I wrote that calculates what I described above.
     
    Last edited: Jan 8, 2018
    0ct0berBkkitPlgins likes this.
  5. Offline

    flxnt

    Thank you Max!
     
  6. Offline

    Max8801

    You're welcome
     
Thread Status:
Not open for further replies.

Share This Page