[ H3LP ] Find entity in half the sphere?
Hello, What I need is to find players in a sphere, but only those in front of the player, i.e. those who are behind or beside the player should not be identified.
|
Re: [ H3LP ] Find entity in half the sphere?
Probably the easiest way: find_sphere_class/find_ent_in_sphere + is_in_viewcone.
|
Re: [ H3LP ] Find entity in half the sphere?
Thanks!, but also I have another question, It looks like the find_ent_in_sphere first collects farther players to then check out the closest ones. Is there any way to set this up?
|
Re: [ H3LP ] Find entity in half the sphere?
Quote:
|
Re: [ H3LP ] Find entity in half the sphere?
Sorry, what I meant in fact is to fix this to get closer players, that is, get closest players to then get the farthest.
|
Re: [ H3LP ] Find entity in half the sphere?
You can save the entities with their respective distances and then sort them. Or, if you are sure that it is always farthest to closest, then simply get all of them and reverse the order.
|
Re: [ H3LP ] Find entity in half the sphere?
Well, I'll see what I can do after all, I just need to detect only one player
Edit: I tried to enable 3d mode in Is_in_viewcone and tried to use the is_visible to not detect players that are eg behind the wall, but it does not work. Any suggestions? |
Re: [ H3LP ] Find entity in half the sphere?
Traceline
|
Re: [ H3LP ] Find entity in half the sphere?
I tried to do the following:
Code:
However, trace_line is returning the index of the weapon I am using, in the case, the AWP. Any suggestions? |
Re: [ H3LP ] Find entity in half the sphere?
Loop throw all players better than using find ent in sphere...
|
| All times are GMT -4. The time now is 23:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.