The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to check body part damaged by hit?
Author Message
WRWR
Journeyman
*

Posts: 212
Likes Given: 30
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 1



Post: #1
How to check body part damaged by hit?
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.)
07-11-2012 12:37 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: How to check body part damaged by hit?
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!
(This post was last modified: 07-11-2012 01:53 AM by darksun84.)
07-11-2012 01:51 AM
Find all posts by this user Like Post Quote this message in a reply
WRWR
Journeyman
*

Posts: 212
Likes Given: 30
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 1



Post: #3
RE: How to check body part damaged by hit?
How to check where hit striked?
07-11-2012 02:57 AM
Find all posts by this user Like Post Quote this message in a reply
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #4
RE: How to check body part damaged by hit?
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.
07-11-2012 04:20 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #5
RE: How to check body part damaged by hit?
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 Tongue
(This post was last modified: 07-11-2012 07:56 AM by darksun84.)
07-11-2012 07:55 AM
Find all posts by this user Like Post Quote this message in a reply
WRWR
Journeyman
*

Posts: 212
Likes Given: 30
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 1



Post: #6
RE: How to check body part damaged by hit?
Anyway, sphere gives us result of hiting in messages
Code:
//combat_hit_head2o        "You hit %s on the head!"
hmmm
07-11-2012 06:19 PM
Find all posts by this user Like Post Quote this message in a reply
WRWR
Journeyman
*

Posts: 212
Likes Given: 30
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 1



Post: #7
RE: How to check body part damaged by hit?
is it possible to check message type that i get from sphere or that fired?
07-12-2012 05:17 AM
Find all posts by this user Like Post Quote this message in a reply
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #8
RE: How to check body part damaged by hit?
You see what I mean. :|

Client gets to know but there is nothing to reference inside scripts.
07-12-2012 05:36 AM
Find all posts by this user Like Post Quote this message in a reply
WRWR
Journeyman
*

Posts: 212
Likes Given: 30
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 1



Post: #9
RE: How to check body part damaged by hit?
messages gets from sphere_msgs.scp 0_o
07-12-2012 06:14 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)