Getting players in a specified area [advanced]
Hi, for example, i have an red entity like in image. I make it think and so on..
How can i detect players that are in the green area from image? Something like a view cone :). http://i44.tinypic.com/102joe1.png |
Re: Getting players in a specified area [advanced]
I think, you can use find_ent_in_sphere() to find a player with some interval. If player was found, check the angle between direction to player and "view" vector of your entity. And do trace from entity to player
|
Re: Getting players in a specified area [advanced]
is_in_viewcone() maybe ?
|
Re: Getting players in a specified area [advanced]
lol i totaly forgot that native, and btw, what is the default value for that viewcone check?
|
Re: Getting players in a specified area [advanced]
In case you or someone else could not use is_in_viewcone, there is another way - you need to loop through all alive players and use something like this
PHP Code:
|
Re: Getting players in a specified area [advanced]
Quote:
|
Re: Getting players in a specified area [advanced]
oh fuck, sorry i didnt read it
|
| All times are GMT -4. The time now is 14:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.