![]() |
How to check body part damaged by hit? - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: How to check body part damaged by hit? (/Thread-How-to-check-body-part-damaged-by-hit) |
How to check body part damaged by hit? - WRWR - 07-11-2012 12:37 AM I want to make own combat system. How to check body part that damaged by hit? For example player1 hit to head player2 how to check it for calculate damage (have helmet or not and etc.) RE: How to check body part damaged by hit? - darksun84 - 07-11-2012 01:51 AM i suggest you to enable the combat flag foundable in the sphere.ini COMBAT_TARGETTEDHIT 02000 // Allows setting of preferred hit area by TAG.HITPREFERENCE More Details : Aimed hits are controlled by tags on the "hitter": TAG.HITPREFERENCE holds the targetted zone: 1=head, 2=neck/throat, 3=back, 4=chest, 5=arms, 6=hands, 7=legs, 8=feet (if the value is out of this range it will be changed by %9; "0" means: no preference set); TAG.HITPREFERENCE_CHANCE (0..1000) is the chance to really hit the desired area; TAG.HITPREFERENCE.BONUS is the percent the damage is raised when hit where desired, TAG.HITPREFERENCE.PENALTY is the percent the damage is lowered if the area was missed. The last two values are defaulting to "30". The system is perhaps useful to script a system where a player can look for weak armored bodyparts of his opponent and try to hit him there; could be essential if armor stacking is used. By using tag.hitpreference you can easily know where your hit strike! RE: How to check body part damaged by hit? - WRWR - 07-11-2012 02:57 AM How to check where hit striked? RE: How to check body part damaged by hit? - Anarch Cassius - 07-11-2012 04:20 AM Code: By using tag.hitpreference you can easily know where your hit strike! Yeah, because you set it. Not really the same as getting the info back from Sphere at all. More an "If I wanted your opinion, I'd give it to you" sort of deal. I was excited when the system was announced, then I realized it was INPUT ONLY and thus pretty much useless. In the end I rewrote the hit location system because apparently Sphere will not let you have access to this info in scripts. RE: How to check body part damaged by hit? - darksun84 - 07-11-2012 07:55 AM My fault that i didn't pay much attention in it ! But i think he can still use it by putting tag.hittpreference = <R1,8> in the @hittry trigger Even if the original hit zone is overridden, he have a base to work on it ![]() RE: How to check body part damaged by hit? - WRWR - 07-11-2012 06:19 PM Anyway, sphere gives us result of hiting in messages Code: //combat_hit_head2o "You hit %s on the head!" RE: How to check body part damaged by hit? - WRWR - 07-12-2012 05:17 AM is it possible to check message type that i get from sphere or that fired? RE: How to check body part damaged by hit? - Anarch Cassius - 07-12-2012 05:36 AM You see what I mean. :| Client gets to know but there is nothing to reference inside scripts. RE: How to check body part damaged by hit? - WRWR - 07-12-2012 06:14 AM messages gets from sphere_msgs.scp 0_o |