Laser Pointer (Update 2) 
39 comments This will create a laser pointer. It has wall detection (so the laser stops at walls) and an option for player detection (lags if several players). To enable it set ALLOW_TO_CHECK_PLAYER_POINTER_COLLISION to true.
Changes:
use F4 to activate/deactivate the pointer
"laser end" suggested by KingRhody90
slightly faster
Fixed the lag (it will only lag with man players using a laser)
the pointers no longer stop at obstacles
now it can optionally stop at players
important
read the readme for installation instructions.
Changes:






important
read the readme for installation instructions.
edited 7×, last 07.11.11 02:12:10 am

Comments
39 commentsLog in!
You need to log in to be able to write comments!Log in
can you change this? i don't wanna press f4 to activate laser, can you change it to say !pointer on/off to activate or de-activate it?
09.10.11 03:11:28 pm

My Judgement
Negatives
-> You didn't smoothen the laser
-> Make the laser transparent
-> Make a laser end so the victim would fairly know he's aimed(a laser end is an end of a laser so if everytime the laser aims on a wall. the wall enlightens with color red. so yeah i expect laser ends)
-> You have to implement something to turn it on/off
This works effectively on aim_maps. or if you're going to practice. so yeah good luck improving. I am expecting better enhancements
Negatives
-> You didn't smoothen the laser
-> Make the laser transparent
-> Make a laser end so the victim would fairly know he's aimed(a laser end is an end of a laser so if everytime the laser aims on a wall. the wall enlightens with color red. so yeah i expect laser ends)
-> You have to implement something to turn it on/off
This works effectively on aim_maps. or if you're going to practice. so yeah good luck improving. I am expecting better enhancements

could you make it you have to turn it on so the bots wont have it at the start. so there is less lagg
13.12.10 03:02:41 pm

Nice! havent seen this before, yet another win by DarkByte!
edited 1×, last 11.06.11 05:26:41 pm

Code:
1
2
3
2
3
function ConvertCoord(x)
return (x-(x%32)+32)/32;
end
return (x-(x%32)+32)/32;
end
How about this

Code:
1
2
3
2
3
function ConvertCoord(x)
return math.floor(x/32)
end
return math.floor(x/32)
end
I had the idea of using a single image and just rescaling it to fit. But I also thought that it would still be iterating through the loops so I did not think it would gain speed that way. Though I have added code to prevent it from redrawing and reiterating if the player has not moved or rotated.

sweet code
haven't tried it out but the code looks good.
I was bored once, so I created a similar thing, except instead of a pointer I drew lines to all my enemies, including health (using color) and distance (transparency). Even on my crappy computer I had no lag whatsoever, not even when using the "always" hook.
The lag is caused by creating, coloring and removing a lot of images. In my script, I created one image of 40 × 1 px (I think) for each enemy, and continuously set it's size, color, alpha and pos. (size until enemy that is). Only when the enemy (or I) died, the image was removed.
If you want I can PM you the code (though it's a lot longer than yours).
The idea and the code are really good, only the efficiency could be better

haven't tried it out but the code looks good.
I was bored once, so I created a similar thing, except instead of a pointer I drew lines to all my enemies, including health (using color) and distance (transparency). Even on my crappy computer I had no lag whatsoever, not even when using the "always" hook.
The lag is caused by creating, coloring and removing a lot of images. In my script, I created one image of 40 × 1 px (I think) for each enemy, and continuously set it's size, color, alpha and pos. (size until enemy that is). Only when the enemy (or I) died, the image was removed.
If you want I can PM you the code (though it's a lot longer than yours).
The idea and the code are really good, only the efficiency could be better

wow i see first screenshot fps 38 second 23 third 17 and fourth 13, 15 seconds later crash