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 disable hitting specific body parts?
Author Message
falsemirage
Apprentice
*

Posts: 13
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: May 2013
Reputation: 0



Post: #1
How to disable hitting specific body parts?
I've been searching forums for the past 2 days, but couldn't find anything about this.

Is there a way to disable hitting specific parts of body ?
When I hit someone games passes a sysmessage with "You hit <npc.name> chest!"
"You hit <npc.name> left thigh!"

Is it possible to disable this and treat hitbox as the whole body ?
07-23-2016 11:24 AM
Find all posts by this user Like Post Quote this message in a reply
Kanibal
Master
**

Posts: 255
Likes Given: 6
Likes Received: 30 in 28 posts
Joined: Jun 2012
Reputation: 0



Post: #2
RE: How to disable hitting specific body parts?
(07-23-2016 11:24 AM)falsemirage Wrote:  Is it possible to disable this and treat hitbox as the whole body ?
Find this messages:
Code:
You hit <npc.name> chest!
You hit <npc.name> left thigh!
...
And change it to whatever you need.

Grandmaster Localhost Admin
07-23-2016 04:19 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #3
RE: How to disable hitting specific body parts?
The 'detail' command is allowing these messages to be shown or not, just type .detail 0 or set it via script for all characters.

There's also a local managing which part of the body is being hit inside the @Hit trigger.
07-23-2016 10:07 PM
Find all posts by this user Like Post Quote this message in a reply
falsemirage
Apprentice
*

Posts: 13
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: May 2013
Reputation: 0



Post: #4
RE: How to disable hitting specific body parts?
Sorry for not giving the important detail, I guess it happens when you ask a question at 3 AM lol
Problem is not the messages (but knowing that it can be disabled is great Thx!)
When I hit npc, I can't damage him if my hit lands on his thigh or some other parts. I guess I can only damage npc when hit lands on his head and few other.
I have a custom combat system which lets me use elemental damage and resists.
Can I make it so that hits only goes to shield so I can script custom parry or dodge system as well ?

EDIT: Ok I've figured it out. I set <argn2> under both @hit and @gethit to 80 (which is dam_general) and it works as I wanted.
(This post was last modified: 07-24-2016 12:45 PM by falsemirage.)
07-24-2016 12:45 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #5
RE: How to disable hitting specific body parts?
That local is meant to set which layer to hit on, setting it to 0 should prevent hitting any part. Which is the same that you did, but knowledge is power Tongue
08-08-2016 05:32 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes XuN's post
Snaigel
Journeyman
*

Posts: 75
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0



Post: #6
RE: How to disable hitting specific body parts?
Quote:EDIT: Ok I've figured it out. I set <argn2> under both @hit and @gethit to 80 (which is dam_general) and it works as I wanted.

What did you write exactly? and you mean in the @hit of the weapons or where?

Quote:There's also a local managing which part of the body is being hit inside the @Hit trigger.

Where can I find that local??
(This post was last modified: 02-06-2017 12:21 AM by Snaigel.)
02-05-2017 11:57 PM
Find all posts by this user Like Post Quote this message in a reply
xwerswoodx
Journeyman
*

Posts: 86
Likes Given: 4
Likes Received: 7 in 4 posts
Joined: Jun 2012
Reputation: 0

UoMMO

Post: #7
RE: How to disable hitting specific body parts?
(02-05-2017 11:57 PM)Snaigel Wrote:  
Quote:EDIT: Ok I've figured it out. I set <argn2> under both @hit and @gethit to 80 (which is dam_general) and it works as I wanted.

What did you write exactly? and you mean in the @hit of the weapons or where?

Quote:There's also a local managing which part of the body is being hit inside the @Hit trigger.

Where can I find that local??

@Hit and @GetHit are character triggers.

So for his solution is, he add his global event;

Code:
On=@Hit
ARGN2=80

On=@GetHit
ARGN2=80

I do not know if you have any global event, but you can add new one from Sphere.ini, there is a section EventPlayer=

If you enable it you can add e_player or any other event to there, or under your skillclass 0 (which can be found inside sphere_skills.scp)

Code:
On=@Login
IF !(<ISEVENT.e_player_event>)
  EVENTS +e_player_event
ENDIF

[Events e_player_event]
On=@Hit
ARGN2=80

On=@GetHit
ARGN2=80
02-06-2017 06:03 AM
Find all posts by this user Like Post Quote this message in a reply
Snaigel
Journeyman
*

Posts: 75
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0



Post: #8
RE: How to disable hitting specific body parts?
Thank you very much!!, that was like the most important thing for my server, the random damage was making me sad.
I learn about this things.
02-06-2017 06:28 AM
Find all posts by this user Like Post Quote this message in a reply
Snaigel
Journeyman
*

Posts: 75
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0



Post: #9
RE: How to disable hitting specific body parts?
Tested it player vs player, and it seems to don't evalue the armor.. doesn't matter if I have 250 armor or 30, the weapon always do the same damage (tryied with different weapons)
02-06-2017 08:39 AM
Find all posts by this user Like Post Quote this message in a reply
xwerswoodx
Journeyman
*

Posts: 86
Likes Given: 4
Likes Received: 7 in 4 posts
Joined: Jun 2012
Reputation: 0

UoMMO

Post: #10
RE: How to disable hitting specific body parts?
Can you try it to change 80's to 080

And, so I read your message again, you asked to disable random damage don't you? I think dam_general (080) made it random, so if you want to do it to hit specific part, send a message so I can help you to code it.
(This post was last modified: 02-06-2017 08:13 PM by xwerswoodx.)
02-06-2017 08:10 PM
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)