Raised This Month: $51 Target: $400
 12% 

[INFO] Fakemeta & Ham detailed function descriptions and examples


Post New Thread Reply   
 
Thread Tools Display Modes
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 02-22-2011 , 02:09   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #181

I can't even describe how much this thread has helped me in the past few months. Newer people really should know about this.

Bump for justice.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-22-2011 , 02:16   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #182

"Sticked"
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 02-22-2011 , 03:30   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #183

Quote:
Originally Posted by wrecked_ View Post
I can't even describe how much this thread has helped me in the past few months. Newer people really should know about this.

Bump for justice.
Oh, it is nice to see that people still have interest in this topic.
Will add some more functions in the funcwiki and here after my access to it will be fixed.

Quote:
Originally Posted by ConnorMcLeod View Post
"Sticked"
Thank you!
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 12-05-2011 , 12:22   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #184

Do one for TraceHull.
SpeeDeeR is offline
CVarsMaster
Junior Member
Join Date: Mar 2009
Old 04-29-2012 , 12:04   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #185

What's the difference between InOpen and StartSolid values from traceline function? I mean, StartSolid detects if starts on a solid object (brush) and InOpen detects if starts on a entity?
CVarsMaster is offline
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-22-2012 , 14:00   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #186

Awesome !
Very good Job ! It's very usefull !! Thanks a lot
__________________
Pawn ? Useless
Aooka is offline
Old 07-21-2012, 04:21
tomhal46273
This message has been deleted by Arkshine. Reason: spambot
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 12-04-2012 , 07:31   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #187

Thank you all for creating this tread, it really helped me alot to understand much better of how to use!
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 03-19-2013 , 06:36   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #188

Quote:
Originally Posted by ot_207 View Post
Fakemeta function:
PHP Code:
EngFunc_TraceLine 
Description:
This function traces between 2 origins and gives us information about it.

The constants that we can use in flags:
PHP Code:
#define DONT_IGNORE_MONSTERS            0
#define IGNORE_MONSTERS                 1
#define IGNORE_MISSILE                  2
#define IGNORE_GLASS                    0x100 
These constants can be used together.
Ex: IGNORE_MISSILE | IGNORE_MONSTERS | IGNORE_GLASS - This makes the traceline ignore missiles, monsters (players) and glass.

Here is a drawing that will show you how it works!
PHP Code:
engfunc(EngFunc_TraceLinestartendIGNORE_GLASS0tr
[IMG]http://img529.**************/img529/1863/traceline1.jpg[/IMG]

PHP Code:
engfunc(EngFunc_TraceLinestartendDONT_IGNORE_MONSTERS0tr
[IMG]http://img529.**************/img529/1415/traceline2.jpg[/IMG]

PHP Code:
engfunc(EngFunc_TraceLinestartendIGNORE_GLASS0tr
[IMG]http://img529.**************/img529/5815/traceline3.jpg[/IMG]

PHP Code:
engfunc(EngFunc_TraceLinestartendIGNORE_GLASS0tr
[IMG]http://img529.**************/img529/326/traceline4.jpg[/IMG]

Functions that come with the TraceLine pack:
PHP Code:
// Description: This creates a trace handle! 
// It is important to use because we don't want our plugins to mess with eachothers info!
new ptr create_tr2() 
PHP Code:
// Description: This creates a trace handle! 
// It is important to use because we don't want our plugins to mess with each others info!
free_tr2(ptr
PHP Code:
// Description: Gets/Sets information from/in the trace_handle
[g|s]et_tr2(trace_handleCONSTANTnumber_if_needed!) 
CONSTANT Expresion has this posible values:
Code:
enum TraceResult
{
	TR_AllSolid,		// int
	TR_StartSolid,		// int
	TR_InOpen,		// int
	TR_InWater,		// int
	TR_flFraction,		// float
	TR_vecEndPos,		// float array[3]
	TR_flPlaneDist,		// float
	TR_vecPlaneNormal,	// float array[3]
	TR_pHit,		// int (edict_t*)
	TR_iHitgroup,		// int
};
The float and array values need the third argument! Example:

PHP Code:
    new allsolid get_tr2(traceTR_AllSolid)
    new 
startsolid get_tr2(traceTR_StartSolid)
    
// TR_StartSolid is a boolean that says whether you were "inside" something 
    // (usually the world) when the trace started (point A)
    // TR_AllSolid tells you if you ever got out of the "inside" or not.
    
    
new inopen get_tr2(traceTR_InOpen)
    
// TR_InOpen means that the start point is in Open
    // That means in the world and not in an ent or something
    
    
new hit get_tr2(traceTR_pHit)
    
// What was hit by the traceline. It will either be a player index,
    // entity index, 0 (part of map), or -1 (didn't hit anything; 
    // doesn't happen with player tracelines).
    
    
new hitgroup get_tr2(traceTR_iHitgroup)
    
// If the traceline hit another player, returns will be HIT_HEAD,
    // HIT_CHEST, HIT_LEFTLEG... etc. If the traceline hit part of the
    // map, this returns HIT_GENERIC.
    
    
new Float:fraction
    get_tr2
(traceTR_flFractionfraction)
    
// Returns a number between 0.0 and 1.0, indicating how far the
    // traceline traveled start to end before it hit something. Depending
    // on what conditions were passed to this traceline forward function,
    // it could either be a wall or another entity.
    
    
new Float:end_origin[3]
    
get_tr2(traceTR_vecEndPosend_origin)
    
// The official end of the traceline. Not necesarily the same as the
    // second argument passed to this traceline forward function.
    
    
new Float:normal[3]
    
get_tr2(traceTR_vecPlaneNormalnormal)
    
// Returns a 1 unit long vector normal to the spot that it hit. Note
    // that "normal" has a special connotation here. It doesn't mean "regular." 
Example Stock:
PHP Code:
stock is_wall_between_points(Float:start[3], Float:end[3], ignore_ent)
{
    
// Create the trace handle! It is best to create it!
    
new ptr create_tr2()
    
    
// The main traceline function!
    // This function ignores GLASS, MISSILE and MONSTERS!
    // Here is an example of how you should combine all the flags!
    
engfunc(EngFunc_TraceLinestartendIGNORE_GLASS IGNORE_MONSTERS IGNORE_MISSILEignore_entptr)
    
    
// We are interested in the fraction parameter
    
new fraction
    get_tr2
(ptrTR_flFractionfraction)
    
    
// Free the trace handle (don't forget to do this!)
    
free_tr2(ptr)
    
    
// If = 1.0 then it didn't hit anything!
    
return (fraction != 1.0)

Extra info:
Valve - arguments of the trace handle
TraceLine Tutorial (Nomexous)
I have Question
What is "GLASS", what does that mean?
Is it some kind of entity like func_wall or it is texture material type?
.Dare Devil. is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-19-2013 , 07:33   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #189

Like the one in cs_assault, T side, you see ? But It's most likely related to any entity with some render.
__________________
Arkshine is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-27-2014 , 13:18   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #190

Here

PHP Code:
Register_Ham(Ham_TraceAttack"func_breakable""fw_traceatt_break"
---->
PHP Code:
RegisterHam(Ham_TraceAttack"func_breakable""fw_traceatt_break"
Just a small typo,but....
HamletEagle 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 08:38.


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