Raised This Month: $ Target: $400
 0% 

[SOLVED?]Laser Beam - How to block it when it hits an object or entity?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
CodeMaster
Junior Member
Join Date: Dec 2008
Old 12-23-2008 , 06:00   Re: Laser Beam - How to block it when it hits an object or entity?
Reply With Quote #3

I've already found that last night, still thanks for willing to help

I've considered using PreThink too, but I'm not sure will trace_line function call the event, 'cause I need it to get called since the beam manipulation is in the event hook.

Now only problem is making it refresh faster.

OK, I've did this, but it's still at low refresh rate:
Code:
public hook_prethink(id) {
    new Float:start_origin[3]
    new Float:end_origin[3]
    new Float:return_vec[3]
    pev(id,pev_origin,start_origin)
    pev(id,pev_endpos,end_origin)
    fm_trace_line(id,start_origin,end_origin,return_vec)
}
Cheers ;)

Nidza

Last edited by CodeMaster; 12-23-2008 at 07:15.
CodeMaster 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 09:19.


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