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

Find boxes in Dust2


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
N1ghtmr1
Member
Join Date: Nov 2005
Old 04-30-2009 , 17:47   Find boxes in Dust2
Reply With Quote #1

Hello.

I was wondering if anyone knew, if it was possible to find the boxes not included in the map (not FL_WORLDBRUSH) in dust_2 by using traceline or at another method? Example the box at the bomb side a. I'm interrested in a method to validate if a point (x,y,z) is inside the box.

I've tried to traceline small steps, but it doesn't seem like traceline TR_pHit can find the box. It finds other entities like players, but no boxes

Thanks.
N1ghtmr1 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-30-2009 , 17:52   Re: Find boxes in Dust2
Reply With Quote #2

Boxes ? What boxes exactly ?
Arkshine is offline
N1ghtmr1
Member
Join Date: Nov 2005
Old 04-30-2009 , 17:59   Re: Find boxes in Dust2
Reply With Quote #3

Example:



I would like to avoid find_entity_sphere as it would be too slow for my purpose
N1ghtmr1 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-30-2009 , 18:01   Re: Find boxes in Dust2
Reply With Quote #4

It's an entity ( func_breakable ) If I'm right, so you should be able to detect it with a traceline. Show your code.
Arkshine is offline
N1ghtmr1
Member
Join Date: Nov 2005
Old 04-30-2009 , 18:07   Re: Find boxes in Dust2
Reply With Quote #5

This is what i try so far. It renders players when hit, but not the box. It's verified that the line passes through the box graphically.
Code:
engfunc(EngFunc_TraceLine,lastorigin,entOrigin,0,testEnt,0)
pHit = get_tr2 ( 0, TR_pHit )
	
if (pHit > 0)
{
		server_print("phit ent %i",pHit)
                set_rendering(pHit,kRenderFxGlowShell,0,255,255,255)

}
N1ghtmr1 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-30-2009 , 18:13   Re: Find boxes in Dust2
Reply With Quote #6

What's lastorigin and entOrigin, and testEnt exactly.
Arkshine is offline
N1ghtmr1
Member
Join Date: Nov 2005
Old 04-30-2009 , 18:17   Re: Find boxes in Dust2
Reply With Quote #7

It's from an entity, entTest, walking a distance between two points. Lastorigin is the origin before move, and entOrigin is the origin after move.
N1ghtmr1 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-30-2009 , 18:25   Re: Find boxes in Dust2
Reply With Quote #8

Well the problem for sure is lastorigin or entOrigin or both. You should try to use TE_BEAMPOINT to see the current line created between this 2 points, because if the line passes through such entity, pHit will return the entity index. Since you don't show much code I can't really help you but you have something wrong on your code.
Arkshine is offline
N1ghtmr1
Member
Join Date: Nov 2005
Old 04-30-2009 , 18:29   Re: Find boxes in Dust2
Reply With Quote #9

Sorry for not showing much code, it's rather complex. Anyways i'll try to setup a scenario which a traceline between two static points going through the box and see the result.
N1ghtmr1 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-30-2009 , 18:34   Re: Find boxes in Dust2
Reply With Quote #10

No problem. It will work, you will see. :p
Arkshine 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 13:14.


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