Plugin category: IDK Suggested name: Body Shot! What I want: When an arrow hits somebody, depending on the body part, it does a certain amount of damage. So, if the arrow hits any of the body parts, (preferably: head, torso, arms, crotch, legs), it does a certain amount of damage. When it hits the person who was shot at, the person who shot the arrow should get a message saying, &6You shot %playershot% in the %spothit%! &4OUCH! The config should be able to change the amount of damage done to certain body parts, and could be able to change the message. Ideas for commands: /bs msg toggle Ideas for permissions: bodyshot.message (receive the message) When I’d like it by: ASAP, preferably sometime in the next week.
What if you get the location of the arrow in terms of y and compare that to the hit entity, and calculate a "foot" "legs" "chest" "head" area... Just kinda shooting the breeze, but would that work?
Lorinthio timtower It is possible though, if you look at the following It returns a double value Edit 1: Also a lot of servers depend on pvp as their main attraction. So a plugin like this could possibly become popular because it does change the way pvp action takes place Edit 2: The math wouldn't be that complex actually, you check if your looking at a player, and if they are and it's above, for example, 7.7, it's a headshot. If it's below 7.4, it's a foot or leg shot. If it's in between, it's a body shot.
timtower A location supports double values, same thing only horizontal It is almost the same as block collision in 2D game design, think of it like this but with decimal values
That would be relatively difficult. The head is pretty easy, though. I suppose the hardest part about the arms is you have to check the rotation.
Garris0n Actually it wouldnt be as difficult either, you could get the player that was hit and use the following Location org.bukkit.entity.LivingEntity.getEyeLocation ( ) Get a Location detailing the current eye position of the living entity. Returns a location at the eyes of the living entity Then you can get the location the player is looking (north, south, east, west). Then simply compare that to the damager. The horizontal hit detection would be determined by the angle that the players are facing each other, which would use the following picture
timtower That's true, so it would be off by a little if you did it the way I explained, but it would only be by around .1 or .2, if you look at the following screenshot That is looking left, but the most the body could be turned to the center. It would be a very small amount If you took a line from the bottom of the picture to the top, it's still possible to hit just the arms. I guess it's possible to calculate it using if they are moving or not, but that would be to involved and not worth the extra .2 ..And yes..I had to get on Minecraft to double check if I was right Sorry to double post, but there is this which according to the creator "it should work [in 1.7.2]" http://dev.bukkit.org/bukkit-plugins/headshotarrow/ Although it doesn't support arms EDIT by Moderator: merged posts, please use the edit button instead of double posting.
I thought I remembered a plugin doing something like this, I just didnt have the time to look it up. But really this is doable (rather simple) if you ignore the arms, and would still be light weight. I feel like adding all the rotational/position math for arms could get heavy depending on the number of players. Also the event could be configurable to check mobs or not (with different math per type, example chicken or enderdragon is completely different from zombie or skeleton). So really its just how far would it be valuable enough to code... just PvP? Include a more RPG-ish system where you could cripple? Or even extend to creatures to be more like a Fallout type damage system feet < arms < legs < chest < head So this is a cool idea, and could built a lot farther than headshotarrow, I just don't have the time to make it myself, but if someone else wanted to, I could offer my help Granted all of this is a lot more than the original poster was asking about, I'm sure headshotarrow would do what they need EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Along with Lorinthio I would also help anyone who is willing to put in the effort to add arms, legs, chest
Really we could probably get it started, make it open source, and let it develop that way. Most open source things are (usually) pretty successful. That way we wouldn't have to make 100% of it
Lorinthio I actually created a good part of the project already. It grabs all the information needed to calculate if it was a headshot, bodyshot, or leg shot but doesnt do anything. I did this to make sure it was possible about what I was saying with calculating the arms, but I deleted the project....Anyway It would only take around a half an hour to get to where I was I don't use github that much, possibly we could do this through saros, I find it very helpful
Sure I haven't used Saros either, but if you wanna recreate that, I can throw on YML config, so users can define the multiplier per location. But when its up to a good point we can upload to bukkit(co-author) and add bits and pieces as we wish. If that sounds good to you?
Lorinthio you should contribute a bit more. A 4 minute YAML and a 1 hour body of code = big difference for equal rewards
I talked it over with Lorinthio and that is clearly not what he meant, and I think you are just misunderstanding what he means. All is well and we will both contribute to the plugin equally. That being said lorinthio and I will be starting this project on github, and the link will be below when we get the chance to start it (Most likely tomorrow). If anyone who came across this message want's to contribute, feel free to follow us on github or saros. matt729 Now, if this project hasn't been taken already, this plugin request is officially filled until farther notice, if you wish to follow up on our progress just see our github project. Thanks