Forum

> > CS2D > General > Time Limit in a TDM?
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Time Limit in a TDM?

8 replies
To the start Previous 1 Next To the start

old Re: Time Limit in a TDM?

DC
Admin Off Offline

Quote
what kind of time limit?

> a round time limit? doesn't make sense in (team)deathmatch mode because there are no rounds (you respawn instantly). therefore it is not available. you could use Lua scripts to add something like a round time limit though.

> a map limit for mapchange? see cs2d cmd mp_timelimit

old Re: Time Limit in a TDM?

Crazyx
User Off Offline

Quote
Maybe he means something like for example:
He sets the round for 10 minutes in TDM, and in those minutes players can respawn and stuff and the round only ends when time runs out (instead of ending when all players die like Standard mode).
That's not possible on normal options... I hate to say it but I think Lua should help

old Re: Time Limit in a TDM?

Ruirize
User Off Offline

Quote
I'm making a custom game mode, that requires respawning.

So I have to use TDM. But I also need a round time limit.

I was gonna just do the Lua one, but it seemed hacky, and well yeah.

I'll do that anyways.

old Re: Time Limit in a TDM?

Kurt Cobain
User Off Offline

Quote
Ruirize has written
I'm making a custom game mode, that requires respawning.

So I have to use TDM. But I also need a round time limit.

I was gonna just do the Lua one, but it seemed hacky, and well yeah.

I'll do that anyways.


as DC said, you cannot have Round Time in a Team Deathmatch server.

old Re: Time Limit in a TDM?

Obey138
User Off Offline

Quote
You can make something like that:
There are example 10 minutes rounds.
Players can spawn instantly.
If round ends, wins team with most kills :).

old Re: Time Limit in a TDM?

Crazyx
User Off Offline

Quote
MarBoy2314 has written
You can make something like that:
There are example 10 minutes rounds.
Players can spawn instantly.
If round ends, wins team with most kills :).

That's what I said.

old Bomberman Lua

Rainoth
Moderator Off Offline

Quote
I think you should download bomberman script in lua archive there is tyme limit so should work...

old Re: Time Limit in a TDM?

HaRe
User Off Offline

Quote
Ruirize has written
I'm making a custom game mode, that requires respawning.

So I have to use TDM. But I also need a round time limit.

I was gonna just do the Lua one, but it seemed hacky, and well yeah.

I'll do that anyways.


Eh eh u can always use scripts

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
function Array(m)
	local array = {}
	for i = 1, m do
		array[i]=0
	end
	return array
end

timer=0
playerdeath = Array(32)
playerscore = Array(32)

addhook("startround","timestart")
function timestart()
timer=0
	for id = 1,32 do
		if (player(id,"exists")) then
			if playerscore[id]==0 and playerdeath[id]==0 then
				--
			else
				parse("setdeaths "..id.." playerdeath[id]")
				parse("setscore "..id.." playerscore[id]")
			end
		end
	end
end

addhook("endround","savescore")
function savescore()
	for id = 1,32 do
		if (player(id,"exists")) then
			playerscore[id]=player(id,"score")
			playerdeath[id]=player(id,"deaths")
		end
	end
end

addhook("minute","timego")
function timego()
	timer=timer+1
	if timer==3 then -- change 3 to your round time
		parse("sv_restart 1")
	end
end
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview