Forum

> > CS2D > Scripts > glow lua
Forums overviewCS2D overview Scripts overviewLog in to reply

English glow lua

9 replies
To the start Previous 1 Next To the start

old glow lua

king923
User Off Offline

Quote
can some one make a lua script where tero glows red and counter glows blue automatic and arround the player whithout key press or command please?

thnx

old Re: glow lua

Avo
User Off Offline

Quote
It's not so hard. I'll maybe make it, but later.

old Re: glow lua

king923
User Off Offline

Quote
that makes all player glow yellow
thnx bolt if you have time i want players to glow like sys > Lua > Samples > Glow.lua (with glow around them) but ct blue and tero red
thnx
edited 1×, last 19.07.12 05:16:29 pm

old Re: glow lua

Yates
Reviewer Off Offline

Quote
user king923 has written
that makes all player glow yellow

Then add:
1
2
3
4
5
if player(id,"team") == 1 then -- Terrorist
	imagecolor([imageid],255,0,0)
elseif player(id,"team") == 2 then -- Counter-Terrorist
	imagecolor([imageid],0,0,255)
end
Somewhere in the code. I have not seen the code, but you could add this on spawn.

old Re: glow lua

king923
User Off Offline

Quote
yates can you see how ys > Lua > Samples > glowingplayers.lua work and edit it please?

old Re: glow lua

MikuAuahDark
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
imgs = {} for id = 1,32 do imgs[id]=0 end
addhook("spawn","glowing")
function glowing(id)
	imgs[id]=image("gfx/sprites/flare2.bmp",0,0,(id+100))
	imageblend(imgs[id],1)
	imagealpha(imgs[id],0.5)
	if player(id,"team")==1 then
		imagecolor(imgs[id],255,0,0)
	elseif player(id,"team")==2 then
		imagecolor(imgs[id],0,0,255)
	elseif player(id,"team")==3 then
		imagecolor(imgs[id],255,255,255)
	end
end

addhook("die","notglow")
function notglow(id)
	if imgs[id]>0 then
		freeimage(imgs[id])
		imgs[id]=0
	end
end
edited 1×, last 21.07.12 04:17:51 am

old Re: glow lua

omg
User Off Offline

Quote
its inefficient to keep deleting and remaking the images each death/spawn; better off doing it more like the sample
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview