Raised This Month: $ Target: $400
 0% 

[SOLVED]how to check if ent1 can "see" ent2


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
powwoww
BANNED
Join Date: Oct 2008
Old 05-24-2009 , 10:41   [SOLVED]how to check if ent1 can "see" ent2
Reply With Quote #1

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

Last edited by powwoww; 05-24-2009 at 12:35. Reason: solved
powwoww is offline
 



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 01:28.


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