Forum

> > CS2D > General > Football lua !
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Football lua !

31 replies
Page
To the start Previous 1 2 Next To the start

old Football lua !

tomzo
User Off Offline

Quote
I have got very good fooball map but i want football lua for my map.
I dont know creating lua

For example i want this lua.

Goal Keeper ( Tactical Shield ) (150 hp)
Defender (150 hp , Slow)
Midfielder (100 hp , Fast)
Striker (120 hp Middle Speedy)

old Re: Football lua !

- Suppp -
User Off Offline

Quote
He said:
I dont know creating lua

anyway, snowball is not a good football... you know why?
you throw it away and, SHIT!!! no more footballs

IDEA!!!: made a sprite, football, then made a DWALL and if terrorists (area) hits it, its goes somewhere!

((sorry for my english)) ok ok we must only wait, then someone got an idea and O.o we got an football!!!

old Re: Football lua !

wups
User Off Offline

Quote
Why not edit the buildings.png and change the barricade to a football. Then use the spawnobject method?

Or just use snowballs.

The best should be too use flags.

old Re: Football lua !

KimKat
GAME BANNED Off Offline

Quote
I remember in earlier versions of CS2D that you could move the blood of gore, by walking towards it to push it. Well, I'm just thinking... that method could be used in order make a football which can be moved in practicly any direction depending on players position and angle, there needs to also be a ability to pass players like a hard push on the football binded to key (lol), although someone has to code that.

I'd really love to have a soccer/football gamemode since CS2D has zombie and construction gamemode already, it would be so fun to play this gamemode.

That would just be the coolest thing.

old Re: Football lua !

ilovemyself
User Off Offline

Quote
Vectar666 has written
How about grenades?

They just explode when you throw them. What if we want to throw to my teammate.

Someone has to make map for football and combine it with lua. I think this is hard to do.

Best solution is waiting DC to create a football mode.
Yeah DC, what you say?

old Re: Football lua !

sonnenschein
User Off Offline

Quote
football is kinda like "Bombing Run" in Unreal Tournament, or other games. The objective of Bombing Run is this:
Offical UnrealTournament site has written
Each level has one ball in the middle of the play field. The objective is to pick up the ball, deliver it to the enemy base and fire it through their goal. You must also defend your own goal to prevent the enemy from scoring. The ball is dropped when a player is killed and can then be picked up by anyone on either team.

old Re: Football lua !

wups
User Off Offline

Quote
Why not use the flag method?
Instead to request over 9000 things.

I think a football mode in cs2d only ruin the game.
Why not play football games instead of cs2d.
That already have all things.

old Re: Football lua !

Zune5
COMMUNITY BANNED Off Offline

Quote
Ask DC to create a editor entity to make a soccer/football ball. Hey, Bungie puts random crap in there popular game all the time. But people seem to enjoy it...

old Re: Football lua !

DC
Admin Off Offline

Quote
oh yeah... it's not possible with the current release.
however we will have dynamic objects / sprites which can be moved with the next release (or a later release).

so stay tuned. this insane football shit (and MUCH more) will actually be possible in future! hooray!

old Re: Football lua !

TimeQuesT
User Off Offline

Quote
COOL but i have an idea how to make a football mode with lua. we take a snowball and use the impact/projectile hook and the spawnitem event.
edited 1×, last 06.08.09 05:29:04 pm

old Re: Football lua !

Zune5
COMMUNITY BANNED Off Offline

Quote
sHawiK has written
I have got very good fooball map but i want football lua for my map.
I dont know creating lua

For example i want this lua.

Goal Keeper ( Tactical Shield ) (150 hp)
Defender (150 hp , Slow)
Midfielder (100 hp , Fast)
Striker (120 hp Middle Speedy)


Just so you know, the Tactical Shield doesn't block Snowballs.

I think DC should create a soccer/football ball for CS2D like how Bungie added a golf ball and a soccer ball into Halo 3.
That would be sick

old Re: Football lua !

TimeQuesT
User Off Offline

Quote
ahh i tested a lua script and it works!
but there is a problem....
hit the snowball the wall it spawns in the wall
here is the code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
addhook ("projectile","pro")
function pro (id,weapon,x,y)
if (weapon==75) then
parse ("strip "..id.." 75")
xx = player(id,"x");
yy = player(id,"y");
parse ("setpos "..id.." "..x.." "..y)
xz = player(id,"tilex");
yz = player(id,"tiley");
parse ("setpos "..id.." "..xx.." "..yy)
o = 75;
parse ("spawnitem "..o.." "..xz.." "..yz)
end
end

i decided to make a soccer luascript !
edited 1×, last 06.08.09 05:39:35 pm

old Re: Football lua !

KimKat
GAME BANNED Off Offline

Quote
sHawiK has written
I have got very good fooball map but i want football lua for my map.
I dont know creating lua

For example i want this lua.

Goal Keeper ( Tactical Shield ) (150 hp)
Defender (150 hp , Slow)
Midfielder (100 hp , Fast)
Striker (120 hp Middle Speedy)
I guess you're talking about my map I assume, but it's called Handball as long as you pass the snowball(handball) around with your arms, I guess. Anyways the ammo is always 10 when you pass it around, but in future realease DC will have setammo or something similar implemented. But the script is from Blazzingxx I think, I just modified the script a bit.

I can host a server with handball but the latency will be like a really scary horror movie at times, because of my connection.

old Re: Football lua !

Flacko
User Off Offline

Quote
I had some problems but I finally finished my football mod.
Note1: Strings are in spanish, replace them by yourself, don't be lazy.
Note2: Goal checking is done through Lua, you'll have to replace that too
Note3: You may find some bugs that I couldn't fix, but they don't seriously affect gameplay

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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
if not flacko then flacko={} end
flacko.sjam={}

ball = 75
knife = 50

function hudtext2(id,tid,color,txt,x,y)
	local toprint = ("©"..color.." "..txt)
	parse('hudtxt2 '..id..' '..tid..' "'..toprint..'" '..x.." "..y)
end

addhook("spawn","flacko.sjam.spawn")
function flacko.sjam.spawn(id)
	flacko.sjam.updatehud(id)
	return "x"
end

function flacko.sjam.updatehud(id)
	if(player(id,"exists")) then
		hudtext2(id,1,"255000000",flacko.sjam.tscore,13,179)
		hudtext2(id,2,"000128255",flacko.sjam.ctscore,13,194)
		hudtext2(id,3,"255255000","-",320,20)
		if(flacko.sjam.playerwball>0 and flacko.sjam.ballinair==false) then
			if(player(flacko.sjam.playerwball,"exists"))then
				hudtext2(id,4,"255255000",player(flacko.sjam.playerwball,"name"),13,209)
			else
				hudtext2(id,4,"255255000","",13,209)
			end
		else
			hudtext2(id,4,"255000000","Nadie tiene la pelota",13,209)
		end
	end
end

addhook("die","flacko.sjam.die")
function flacko.sjam.die(victim,killer,weapon,x,y)
	if(flacko.sjam.playerwball == victim) then
		parse("spawnitem "..ball.." "..pixtotile(x).." "..pixtotile(y))
		flacko.sjam.playerwball = 0
	end
	return 1
end

addhook("leave","flacko.sjam.leave")
function flacko.sjam.leave(id)
	local xplayer = player(id,"xtile")
	local yplayer = player(id,"ytile")
	if(flacko.sjam.playerwball==id) then
		parse("spawnitem "..ball.." "..xplayer.." "..yplayer)
		flacko.sjam.playerwball = 0
	end
end

addhook("buy","flacko.sjam.buy")
function flacko.sjam.buy()
	return 1
end

addhook("drop","flacko.sjam.drop")
function flacko.sjam.drop(id)
	if(flacko.sjam.ballinair==false) then
		flacko.sjam.playerwball = 0
		flacko.sjam.ballinair = false
	else
		return 1
	end
end

addhook("startround","flacko.sjam.startround")
function flacko.sjam.startround()
	flacko.sjam.playerwball = 0
	parse("spawnitem "..ball.." 19 12")
end

addhook("minute","flacko.sjam.minute")
function flacko.sjam.minute()
	if(flacko.sjam.playerwball==0) then
		tab = item(0,"table")
		if(#tab==0) then
			parse("spawnitem "..ball.." 19 12")
		end
	end
end

function pixtotile(pix)
	ret = math.floor(pix/32)
	return ret
end
function tiletopix(til)
	ret = til*32
	return ret
end

function flacko.sjam.checkwep(id,wep) --Returns 0 if finds weapon, otherwise it returns 1
	local weapons = playerweapons(id)
	for i = 1, #weapons do
		if weapons[i] == wep then
			return 0
		end
	end
	return 1
end

flacko.sjam.ctscore = 0
flacko.sjam.tscore = 0
flacko.sjam.playerwball = 0
flacko.sjam.ballinair = false

addhook("collect","flacko.sjam.collect")
function flacko.sjam.collect(id,iid,typ)
	if(typ==ball and flacko.sjam.playerwball == 0) then
		giveball(id)
	else
		return 1
	end
end

addhook("walkover","flacko.sjam.walkover")
function flacko.sjam.walkover(id,iid,typ)
	if(typ~=ball or flacko.sjam.playerwball~=0)then
		return 1
	end
end

function giveball(id)
	parse("equip "..id.." "..ball)
	parse("setweapon "..id.." "..ball)
	parse("strip "..id.." "..knife)
	flacko.sjam.playerwball = id
	for i=1,32 do
 		if(player(i,"exists")) then
			flacko.sjam.updatehud(i)
		end
	end
	flacko.sjam.ballinair = false
end

function stripball(id)
	parse("equip "..id.." "..knife)
	parse("strip "..id.." "..ball)
	flacko.sjam.playerwball = 0
end

addhook("hit","flacko.sjam.hit")
function flacko.sjam.hit(id,src,wep)
	if(wep==knife) then
		if(flacko.sjam.playerwball==id) then
			if(flacko.sjam.ballinair==false) then
				stripball(id)
				giveball(src)
			end
		end
	elseif(wep==ball) then
		if(flacko.sjam.playerwball==src) then
			if(flacko.sjam.ballinair==false) then
				stripball(src)
				giveball(id)
			end
		end
	end
	return 1
end

addhook("attack","flacko.sjam.attack")
function flacko.sjam.attack(id)
	if(flacko.sjam.playerwball==id) then
		if(player(id,"weapontype")==ball) then
			flacko.sjam.ballinair = true
		end
	end
end

addhook("projectile","flacko.sjam.projectile")
function flacko.sjam.projectile(id,wep,x,y)
	if(flacko.sjam.playerwball==id) then
		if(wep==ball) then
			local xplayer = player(id,"x")
			local yplayer = player(id,"y")
			if(xplayer<x) then x=x-1 elseif (xplayer>x) then x=x+1 end
			if(yplayer<y) then y=y-1 elseif (yplayer>y) then y=y+1 end
			x = pixtotile(x)
			y = pixtotile(y)
			if(y>=11 and y<=13) then --Y position
				if(x==4) then -- X position (T)
					flacko.sjam.ctscore = flacko.sjam.ctscore + 1
					parse("msg ©000128255"..player(id,"name").." anota para los CT!@C")
					if(player(id,"team")==2) then parse("setscore "..id.." "..(player(id,"score")+1))
					elseif(player(id,"team")==1) then parse("setscore "..id.." "..(player(id,"score")-3)) end
				elseif(x==34) then -- X position (CT)
					flacko.sjam.tscore = flacko.sjam.tscore + 1
					parse("msg ©255000000"..player(id,"name").." anota para los T!@C")
					if(player(id,"team")==2) then parse("setscore "..id.." "..(player(id,"score")-3))
					elseif(player(id,"team")==1) then parse("setscore "..id.." "..(player(id,"score")+1)) end
				end
			end
		parse("spawnitem "..ball.." "..x.." "..y)
		stripball(id)
		flacko.sjam.ballinair = false
		for i=1,32 do flacko.sjam.updatehud(i) end
		end
	end
end

old Re: Football lua !

Thomazz
User Off Offline

Quote
Awesome But can u make it in English ? <_< Not everyone can speak Spanish
To the start Previous 1 2 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview