Forum

> > CS2D > Scripts > Trails and spawn bomb
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Trails and spawn bomb

19 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: Trails and spawn bomb

Apache uwu
User Off Offline

Zitieren
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.

alt Re: Trails and spawn bomb

Alistaire
User Off Offline

Zitieren
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.

alt Re: Trails and spawn bomb

Apache uwu
User Off Offline

Zitieren
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

alt Re: Trails and spawn bomb

Draft
User Off Offline

Zitieren
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

alt Re: Trails and spawn bomb

Apache uwu
User Off Offline

Zitieren
user Draft hat geschrieben
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

alt Re: Trails and spawn bomb

Draft
User Off Offline

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

IMG:https://img560.imageshack.us/img560/9034/15455067.png
1× editiert, zuletzt 28.01.12 23:03:23

alt Re: Trails and spawn bomb

Apache uwu
User Off Offline

Zitieren
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

alt Re: Trails and spawn bomb

Draft
User Off Offline

Zitieren
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?
2× editiert, zuletzt 29.01.12 14:48:20

alt Re: Trails and spawn bomb

Apache uwu
User Off Offline

Zitieren
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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht