Dateien

> > CS2D > Lua Scripts > Laser Pointer (Update 2)
DateiübersichtCS2D-ÜbersichtLua Scripts-Übersicht

Englisch Laser Pointer (Update 2) >

39 Kommentare12 kb, 1.446 Downloads

alt 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.
7× editiert, zuletzt 07.11.11 02:12:10
Zugelassen von DC

Download Download

12 kb, 1.446 Downloads

Kommentare

39 Kommentare
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

Logge dich ein!

Du musst dich einloggen, um selber Kommentare verfassen zu können!Einloggen

alt

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?

alt 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
Ich mag es!

alt

Bauer
BANNED Off Offline

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

alt

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
Ich mag es!

alt Good

Roooster
User Off Offline

Nice! havent seen this before, yet another win by DarkByte!
Ich mag es!
1× editiert, zuletzt 11.06.11 17:26:41

alt

archmage
User Off Offline

Lol yeah I will use that instead
1× editiert, zuletzt 07.11.11 01:01:18

alt

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
Ich mag es!

alt

Snake_Eater
User Off Offline

If I could this...
Dark Byte you show that nothing impossible
Ich mag es!

alt

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.

alt

carloskiller
User Off Offline

mm how do i do that in what program?

alt

kNedLiik
User Off Offline

Try use this..
Edited flacko code to make it F2 on/off
Spoiler >
Ich mag es!

alt

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

alt

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
Ich mag es!

alt

NKN
User Off Offline

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

alt

archmage
User Off Offline

Every frame. That might explain the lag...

@Kel9290
I would if it were possible.

alt

Admir
User Off Offline

is the wall detection update in milisecond or?

alt

Kel9290
User Off Offline

cool but add transparent (if you can)
Ich mag es!
Zum Anfang Vorherige 1 2 Nächste Zum Anfang