[SOLVED?]Laser Beam - How to block it when it hits an object or entity?
First of all I'd like to say hi to the community since this is my first post.
I have quite experience in Pawn (SA-MP coding), but I'm not familiar with AMXModX reference and functionality. I'm interested how could I stop laser beam from passing other entities and objects, so it'd be like a laser aim for some weapons. So all things I'd like to ask would be:
Nidza |
Re: Laser Beam - How to block it when it hits an object or entity?
http://forums.alliedmods.net/showthread.php?t=53989
That'll get you started. About #2, search for "prethink" or "postthink". Post any questions that come up, if you don't understand some functions, I'm willing to give some insight. |
Re: Laser Beam - How to block it when it hits an object or entity?
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) {Nidza |
Re: Laser Beam - How to block it when it hits an object or entity?
Out of curiosity, I made a plugin to see how snappy the "laser pointer" would be.
In conclusion, it can't be made snappy enough. It'll always have some "lag", not really usable. You might want to try the metamod plugin that does the same thing, but I doubt that it'll be much quicker. I included some extra code, feel free to ask questions: PHP Code:
|
Re: Laser Beam - How to block it when it hits an object or entity?
Its all clear, except that part of getting end position...
Could you check my code and say did I got end origin well? Consider that I'm using this for FM_TraceLine. Edit: is there any event, hook that could be handled on mouse movement? Thanks Nidza |
Re: Laser Beam - How to block it when it hits an object or entity?
Quote:
|
Re: Laser Beam - How to block it when it hits an object or entity?
I'm sorry dude, but I think its clear that the appropriate action is unknown (to me)...
Could you be more specific? I've made it to work fine, but I still need the end point... Anyone could give me a hand? (I'm using fakemeta) Thanks Nidza |
Re: Laser Beam - How to block it when it hits an object or entity?
Quote:
Code:
#include <fakemeta_util> |
Re: Laser Beam - How to block it when it hits an object or entity?
Thanks for your help!
+karma for both of you :) EDIT: Does anyone know why TE_KILLBEAM won't actually work? Or could someone write proper usage? Thanks Nidza |
Re: [SOLVED?]Laser Beam - How to block it when it hits an object or entity?
*Bump*
Does anyone know efficient way to "kill the beam" or shorten its life (shorter than 0.1s)? |
| All times are GMT -4. The time now is 09:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.