AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Traceline function [A problem with fakemeta] (https://forums.alliedmods.net/showthread.php?t=132379)

abdul-rehman 07-14-2010 16:41

Traceline function [A problem with fakemeta]
 
I recently read a tutorial regarding tracelines and i understood how to use the trace line function provided by the engine module:
Code:
trace_line(iIgnoreEnt, const Float:fStart[3], const Float:fEnd[3], Float:vReturn[3]);
If a point interfere's in the trace line than the points origin is stored in the vReturn[3] variable

But when i use the traceline function from fakemeta:
Code:
engfunc(EngFunc_TraceLine, V1, V2, fNoMonsters, ENT_TO_SKIP);
i find that there is no such option like this : vReturn[3]

Basically if i use the traceline function using fakemeta then if a point interferes during the traceline than its origin are not returned bcoz fake meta deosnt supports it so how can i make it possible that when a traceline has been done using fake meta and a point interferes than the points origin should be returned by the trace line function

ot_207 07-14-2010 16:44

Re: Traceline function [A problem with fakemeta]
 
It is because you forgot the trace handle (where the data is saved)
PHP Code:

engfunc(EngFunc_TraceLineV1V2fNoMonstersENT_TO_SKIP0);
get_tr2(0TR_vecEndPosvReturn

Look in the tutorials section for my function examples and nomexous tutorial about TRACELINE.

abdul-rehman 07-14-2010 16:50

Re: Traceline function [A problem with fakemeta]
 
Quote:

Originally Posted by ot_207 (Post 1239245)
It is because you forgot the trace handle (where the data is saved)
PHP Code:

engfunc(EngFunc_TraceLineV1V2fNoMonstersENT_TO_SKIP0);
get_tr2(0TR_vecEndPosvReturn

Look in the tutorials section for my function examples and nomexous tutorial about TRACELINE.

Thnx one question
I need to create a handle and use it on both like this:
Code:
engfunc(EngFunc_TraceLine, V1, V2, fNoMonsters, ENT_TO_SKIP, my_handle); get_tr2(my_handle, TR_vecEndPos, vReturn)

ot_207 07-14-2010 16:55

Re: Traceline function [A problem with fakemeta]
 
PHP Code:

// create it before the trace
my_handle create_tr2();
// Free it after not needing it (necessary)
free_tr2(my_handle); 

I already told you about the tuts. Search for them, you will find all you need there.


All times are GMT -4. The time now is 07:08.

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