AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity touch bodypart (https://forums.alliedmods.net/showthread.php?t=246338)

RateX 08-15-2014 23:39

Entity touch bodypart
 
Is there a way to detect if an entity touch a player's specific bodyparts?

hornet 08-16-2014 03:27

Re: Entity touch bodypart
 
Well it depends on what your trying to. What exactly is the entity's purpose?

RateX 08-16-2014 04:13

Re: Entity touch bodypart
 
It deals damage base on bodypart it touch:)

hornet 08-16-2014 06:54

Re: Entity touch bodypart
 
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 ).

RateX 08-17-2014 06:09

Re: Entity touch bodypart
 
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?


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

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