[Question] SDKtools Trace
How do I use TR_GetEntityIndex(Handle:hndl=INVALID_HANDLE) ; ?
I assume this can be used in some very interesting and creative ways. I'm trying to use it in a hooked weapon_fire event to find out what the player is looking at. I've tried testing it using the following code but it just prints out 0. Code:
new Handle:target; |
Re: [Question] SDKtools Trace
Not at all!!
You do a ray-trace, either with TR_TraceRay or with another ray tracing functions that returns you a handle. After that you call TR_GetEntityIndex either with the default value (no argument) or with the handle returned by the complex ray tracing functions. TR_GetEntityIndex will return you the entity index hit by the ray (if any). Example: PHP Code:
|
Re: [Question] SDKtools Trace
not done anything with trace rays in hl2. but i think it might be for if a trace line hits an entity to get the entity index that it hit need to run a trace ray first to find out if the player is looking at an entity done ^ ;)
|
Re: [Question] SDKtools Trace
My plugin spray tracer use TraceRay, if you need to learn how to use it :O
|
Re: [Question] SDKtools Trace
Quote:
|
All times are GMT -4. The time now is 15:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.