Raised This Month: $ Target: $400
 0% 

Solved TraceHull's TR_pHit


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ConorCC
Member
Join Date: Feb 2014
Old 01-10-2021 , 05:35   TraceHull's TR_pHit
Reply With Quote #1

TraceHull's TR_pHit returns only world (-1) and non player entities' ID.

Code:
static trace; trace = create_tr2();
engfunc(EngFunc_TraceHull, origin, end_new, IGNORE_MONSTERS, HULL_HEAD, id, trace);
static hit; hit = get_tr2(trace, TR_pHit);
client_print(0, print_chat, "HIT BY TRACE: %i", hit);
This one should every entities. Isn't it? As I know the game also usning this method to determinate knife attack.

My goal is to detect player's and their body part.

Any useful information?

Edit: Solved. You have to use DONT_IGNORE_MONSTERS instead of IGNORE_MONSTERS. Players are monsters.

Last edited by ConorCC; 01-10-2021 at 05:40. Reason: Solved
ConorCC is offline
 



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 14:11.


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