[SOLVED]how to check if ent1 can "see" ent2
I want to make a weapon like BFG9000 in Doom3, but I dnt know how to check if theres not any blocks between the shell and the enemy player
sorry for my bad english and thx for care xPaw: thank u ,but im afraid that is_in_viewcone returns true only if the player looks at the shell, i mean ,the shell should have the effect as irradiation, the enemies must hide themselves to prevent from being hurt [X]-RayCat: thanks for your information,the code is like the following: new Float:ret[3] hitid = trace_line(bhs[j], bhpos[j], zmpos[i], ret) if(hitid != zms[i])continue //skip if the shell cannot radiate the zombie Also thank Bugsy |
Re: how to check if ent1 can "see" ent2
is_in_viewcone
|
Re: how to check if ent1 can "see" ent2
I dont know about that.. But you could try with traceline .. :)
|
Re: how to check if ent1 can "see" ent2
Quote:
|
Re: how to check if ent1 can "see" ent2
See the code in this thread to see it being used in a plugin. It will block a player from taking damage if the victim (ent1) can see the attacker (ent2)
http://forums.alliedmods.net/showthread.php?t=92845 |
| All times are GMT -4. The time now is 01:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.