Files

> > CS2D > Lua Scripts > Laser Pointer (Update 2)
Files overviewCS2D overviewLua Scripts overview

English Laser Pointer (Update 2) >

39 comments12 kb, 1,507 Downloads

old Laser Pointer (Update 2)

archmage
User Off Offline

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.
edited 7×, last 07.11.11 02:12:10 am
Approved by DC

Download Download

12 kb, 1,507 Downloads

Comments

39 comments
Page
To the start Previous 1 2 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

Omega Zero
User Off Offline

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?

old This is my rate for you

ZXavier88Z
User Off Offline

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
I like it!

old

Bauer
BANNED Off Offline

It dont work |: please help I change it to true but dont go

old

Tomo-mate46
User Off Offline

could you make it you have to turn it on so the bots wont have it at the start. so there is less lagg
I like it!

old Good

Roooster
User Off Offline

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

old

archmage
User Off Offline

Lol yeah I will use that instead
edited 1×, last 07.11.11 01:01:18 am

old

Banaan
User Off Offline

1
2
3
function ConvertCoord(x)
	return (x-(x%32)+32)/32;
end

How about this

1
2
3
function ConvertCoord(x)
	return math.floor(x/32)
end
I like it!

old

Snake_Eater
User Off Offline

If I could this...
Dark Byte you show that nothing impossible
I like it!

old

archmage
User Off Offline

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.

old

carloskiller
User Off Offline

mm how do i do that in what program?

old

kNedLiik
User Off Offline

Try use this..
Edited flacko code to make it F2 on/off
Spoiler >
I like it!

old

carloskiller
User Off Offline

it looks cool but i want to know how to activate the laser if you respond me i give u 5\5

old

Banaan
User Off Offline

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
I like it!

old

NKN
User Off Offline

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

old

archmage
User Off Offline

Every frame. That might explain the lag...

@Kel9290
I would if it were possible.

old

Admir
User Off Offline

is the wall detection update in milisecond or?

old

Kel9290
User Off Offline

cool but add transparent (if you can)
I like it!
To the start Previous 1 2 Next To the start