Forum

> > CS2D > Scripts > Trails and spawn bomb
Forums overviewCS2D overview Scripts overviewLog in to reply

English Trails and spawn bomb

19 replies
To the start Previous 1 Next To the start

old Re: Trails and spawn bomb

Apache uwu
User Off Offline

Quote
What's the point of having everyone spawn with a bomb? I don't think they will be able to all plant it, or even all have it.

@trail: Use images, with ms100, that will give the illusion of a trail and not be extensive.

old Re: Trails and spawn bomb

Alistaire
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
addhook('startround','impossibru')

function impossibru()
	for i = 1, 32 do
		if player(i, 'team') == 1 then
			parse('equip '..i..' bombid')
		end
	end
end

Forgot bomb Id.

old Re: Trails and spawn bomb

Apache uwu
User Off Offline

Quote
well in the video, it glowed & it looks much nicer if it were on always, but of course that would lag the server and clients with that many images

old Re: Trails and spawn bomb

Draft
User Off Offline

Quote
I need simple trail, no glow or something but i want it fade to alpha like in video (when its 3 tiles after the player fade to transparent)

bomb script not work

old Re: Trails and spawn bomb

Apache uwu
User Off Offline

Quote
user Draft has written
I need simple trail, no glow or something but i want it fade to alpha like in video (when its 3 tiles after the player fade to transparent)

bomb script not work


i want it fade to alpha like in video

that is glow

old Re: Trails and spawn bomb

Draft
User Off Offline

Quote
if trail 3 tile distance it become invisible at end its like blending

IMG:https://img560.imageshack.us/img560/9034/15455067.png
edited 1×, last 28.01.12 11:03:23 pm

old Re: Trails and spawn bomb

Apache uwu
User Off Offline

Quote
So something like this?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
image_name="gfx/shadow.bmp"
image_fadetime=1000

addhook("serveraction","_serveraction")
addhook("menu","_menu")
addhook("ms100","_ms100")
addhook("leave","_leave")
addhook("die","_die")

trails={}
images={}

function _serveraction(id,action)
	if action==1 then
		if trails[id]==true then
			menu(id,"Trail,(Trail On),Trail Off|>")
		else
			menu(id,"Trail,Trail On|>,(Trail Off)")
		end
	end
end

function _menu(id,title,button)
	if title=="Trail" then
		if button==1 then
			if trails[id]==nil or trails[id]==false then
				trails[id]=true
				msg2(id,string.char(169).."000255000Trails have been activated.")
			end
		elseif button==2 then
			if trails[id]==true then
				trails[id]=false
				msg2(id,string.char(169).."255000000Trails have been deactivated.")
			end
		end
	end
end

function _ms100()
	for i=1,32 do
		if trails[i]==true and player(i,"exists")==true and player(i,"health")>0 then
			local img=image(image_name,player(i,"x"),player(i,"y"),0)
			table.insert(images,{img,image_fadetime})
			tween_alpha(img,image_fadetime,0)
		end
	end
	for index,img in ipairs(images) do
		if img[2]<=0 then
			freeimage(img[1])
			images[index]=nil
		else
			images[index][2]=img[2]-1
		end
	end
end

function _leave(id)
	trails[id]=false
end

function _die(id)
	trails[id]=false
end

old Re: Trails and spawn bomb

Draft
User Off Offline

Quote
Its exactly what i wanted! but one thing, it looks a little fag.... it should be lighted?

Cool if press f2 then menu trail 1,trail 2,trail 3 if trail 1 then shadow.bmp if trail 2 then flare1.bmp if trail 3 then flare3.bmp

Color custom trail pls


Bomb no work
Bump?
edited 2×, last 29.01.12 02:48:20 pm

old Re: Trails and spawn bomb

Apache uwu
User Off Offline

Quote
Yeah you need to change the images, I simply picked one that I know everyone would have.

@bomb: I don't think that works, game would glitch if you equipped everyone with a bomb.

old Re: Trails and spawn bomb

Apache uwu
User Off Offline

Quote
Read my post.

Change the image to a lighter one, or use imagecolor.

If you're going to be rude I'm not gonna help.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview