Forum

> > CS2D > Scripts > 2 ts
Forums overviewCS2D overview Scripts overviewLog in to reply

English 2 ts

11 replies
To the start Previous 1 Next To the start

old 2 ts

stealth_killer
User Off Offline

Quote
hello guys i have a big problem its that i maked a map called deathrun and i want to spawn 2 or 3 ts and my problem is that i cant put to spawn only 2 ts or 3 ts pls tell me if there is a script or something that i can do

pls reply

when i mean ts i mean terrorists
edited 2×, last 27.02.11 06:10:52 pm

old Re: 2 ts

KimKat
GAME BANNED Off Offline

Quote
You can disable entity spawn points using Lua. First you would need to assign names to the spawn points such as (t1, t2 and t3), in Lua you could make a function that prevents the X(variable) specific amount of terrorists to spawn at one location or area. How exactly I don't really know, but what I do know is that it's possible. You just gotta know how exactly. Hope that was any help...

old Re: 2 ts

KimKat
GAME BANNED Off Offline

Quote
Perhaps I could try at making it... I'm not really good at Lua, but here's my attempt.

... = indicates some more parameters which I don't have right now, unfortunally.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
trigger_state = false
addhook("roundstart","onroundstart")
	trigger_state = true
end
addhook("trigger","ontrigger")
function ontrigger(id,x,y, > ...) --Yes I'm clueless.
	if entity(...,trigger_state==true) then
		if terrorists(...)=...
		-- PREVENT more than 3 terrorists to spawn
		end
	elseif entity(...,trigger_state==false) then
		-- Do nothing, right?
	end
end
???... sorry that's the best I could do at the moment. Someone else who knows Lua please help that guy.

old Re: 2 ts

stealth_killer
User Off Offline

Quote
hey thx man but guys can somebody tell me with the ease way and hey man thx for helping me for little

old Re: 2 ts

Phe0
User Off Offline

Quote
Easy way with editor - you can make 2 (or 3) teleports from TT spawn, that are closing self, when entered*. Then do env_hurt on spawn to kill other TT's and AFK's. I don't think some people want to be killed instantly, then they will join CT, that's why this trick is good.

Edit:
To set two people in TT force can be used editor too, like 2 (or 3) rooms enterable from terrorist's teleports on spawn (up). There can be 2 trigger_use entities, that opens way (like dyn_wall or teleports) for both CT and two (or three) TT's (these teleported). If not enough Terrorists - automaticaly map is not playable.
______
*for example
Name : t1
Trigger : t1

another teleport
Name : t2
Trigger : t2
...
edited 3×, last 27.02.11 07:53:26 pm

old Re: 2 ts

KimKat
GAME BANNED Off Offline

Quote
@Pho: Wouldn't that stop itself from triggering? if you trigger something that triggers itself, especially when it comes to spawn points. The way you did would just disable itself as soon as it's triggered (on/off). Correct me if I'm wrong.

old Re: 2 ts

Time
User Off Offline

Quote
No Kim, the spwan entity would get triggered right after 1 player spawns through it, thus limiting the number of players that can spawn in that location to 1. So right after a spawn entity is used it gets disabled.
Pho's idea is flawless.
Adding only spawns that trigger themselves however would be problematic as the game would crash for the players which hadn't spawned already.

old Re: 2 ts

KimKat
GAME BANNED Off Offline

Quote
Yea but spawning through spawn points is random, therefor all existing spawn points that are still on will still produce spawns for the players on the server. Also, if there is no spawns the game will probably show the message "MEMORY_ACCESS_VIOLATION" most probably.

But I understand what you mean, it will just be on for a while until the server/rcon or Lua script itself disables the spawn point. I don't recommend disabling all of the spawn points due to the error message. Instead it's much better to use a Lua script that forces users to stay in Spec mode, or similar.

old Re: 2 ts

Phe0
User Off Offline

Quote
I think you didn't understood me. I am thinking about func_teleport thingy, that cannot crash game this way. But of course lua is better here. I saw earlier Factis' lua, but it allows only one terrorist.
Sorry for my english...

old Re: 2 ts

KimKat
GAME BANNED Off Offline

Quote
Ask factis to make one that allows 3 or more terrorists then, solution is right there (at least I think so).
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview