Raised This Month: $ Target: $400
 0% 

Entity touch bodypart


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 08-15-2014 , 23:39   Entity touch bodypart
Reply With Quote #1

Is there a way to detect if an entity touch a player's specific bodyparts?
RateX is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 08-16-2014 , 03:27   Re: Entity touch bodypart
Reply With Quote #2

Well it depends on what your trying to. What exactly is the entity's purpose?
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 08-16-2014 , 04:13   Re: Entity touch bodypart
Reply With Quote #3

It deals damage base on bodypart it touch
RateX is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 08-16-2014 , 06:54   Re: Entity touch bodypart
Reply With Quote #4

That still doesn't answer my question. Is it some kind of bullet entity? If so you can run a traceline using the entity's velocity when it touches the player and then check the result for the body part ( TR_iHitgroup ).
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 08-17-2014 , 06:09   Re: Entity touch bodypart
Reply With Quote #5

It worked. Thanks hornet. And yes, it's a crossbow's bolt entity. Few questions:
1. Is the trace result value same as the HIT const in amxconst.inc?
2. I use end_origin = entity_origin + velocity. What would happen if 2 players or more is between entity_origin and end_origin?
3. Will this also work for non-player entity with player model?
RateX is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode