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

Trace hull ignoring entities


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ARES[ro]
Senior Member
Join Date: Apr 2010
Old 08-04-2011 , 16:48   Trace hull ignoring entities
Reply With Quote #1

So im trying to do a trace_hull and return the id of hit only for this 1 player in my argument.
Cause what if theres 3 players in my hull range, and I want to only find the one who is in my argument.
With the trace_hull function
PHP Code:
trace_hull Float:origin[3], hull, [ ignoredent=0ignoremonsters=] ) 
I can only ignore 1 ent ...
__________________
okay
ARES[ro] is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-04-2011 , 17:11   Re: Trace hull ignoring entities
Reply With Quote #2

Set ignoremonsters to 1 and it will ignore players, as for multiple other entities... well, I dunno... you could try -1, maybe it will ignore all entities then if that's what you need.
__________________
Hunter-Digital is offline
ARES[ro]
Senior Member
Join Date: Apr 2010
Old 08-04-2011 , 17:14   Re: Trace hull ignoring entities
Reply With Quote #3

Thanks for the help well yeah I thought about that, it would require a list of entities of some sort and it may just not be possible idk... If its not clear enough ill summarize it, trying to ignore all players except for 1 in a trace_hull.
__________________
okay
ARES[ro] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-04-2011 , 18:06   Re: Trace hull ignoring entities
Reply With Quote #4

trace_hull doesn't return any entity index.
If you want to know pHit you may have to use fakemeta.

Code:
static cell AMX_NATIVE_CALL trace_hull(AMX *amx,cell *params)
{
	int iResult=0;
	TraceResult tr;
	Vector vPos;
	cell *vCell;

	vCell = MF_GetAmxAddr(amx, params[1]);

	vPos.x = amx_ctof(vCell[0]);
	vPos.y = amx_ctof(vCell[1]);
	vPos.z = amx_ctof(vCell[2]);

	TRACE_HULL(vPos,vPos, params[4], params[2], params[3] > 0 ? INDEXENT2(params[3]) : 0 , &tr);

	if (tr.fStartSolid) {
		iResult += 1;
	}
	if (tr.fAllSolid) {
		iResult += 2;
	}
	if (!tr.fInOpen) {
		iResult += 4;
	}
	return iResult;
}
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
ARES[ro]
Senior Member
Join Date: Apr 2010
Old 08-04-2011 , 18:45   Re: Trace hull ignoring entities
Reply With Quote #5

indeed I do thank you Connor I let that detail slide oops,
and then I re-ask the same question:
PHP Code:
EF_TraceHull ( const Float:V1[3], const Float:V2[3], fNoMonstershullNumber, const ENTITY_TO_SKIP 
How to skip more then 1 entity.
__________________
okay
ARES[ro] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-05-2011 , 04:21   Re: Trace hull ignoring entities
Reply With Quote #6

Could you please explain exactly what you want to do ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
ARES[ro]
Senior Member
Join Date: Apr 2010
Old 08-05-2011 , 15:40   Re: Trace hull ignoring entities
Reply With Quote #7

Fix the shield when it comes to knife, so I decided to do a reverse hull trace from the shield to see if the stabber or slasher is in front hull. If it doesnt hit him, the stab was successful.
__________________
okay

Last edited by ARES[ro]; 08-05-2011 at 15:56.
ARES[ro] 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 07:23.


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