http://www.unrealsoftware.de/files_show.php?file=875
That gave me an idea... creating a simple script that would maintain "x" amount of players in the game. Bots would join or leave the game in order to maintain this preset amount of players in the game.
So... after a 'crash course' in Lua scripting <grin> (and browsing the above-linked script), I came up with this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
players = 10 addhook('ms100','botbalance_ms100') function botbalance_ms100() player_count = 0 	for i = 1,32, 1 do 		if (player(i,'exists')) then 			player_count = player_count + 1 		end 	end 	 	if (player_count < players) then 		for i = 1,players, 1 do 			parse('bot_add') 		end 	end 	 	if (player_count > players) then 	parse('bot_remove') 	end end
The above will maintain 10 players in the game. If a human joins the game, a bot leaves (and vice versa).
Now, that being said, I thought it would be handy if human spectators were NOT counted for the total amount of players. In other words:
I have 10 bots, five on each team. I join the game as a spectator, and the bots happily play their exisiting game.
If I join a team, one bot on that team is kicked... and if I join the spectators again, a bot will be added to that team.
So... I modified my script like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
players = 10 addhook('ms100','botbalance_ms100') function botbalance_ms100() player_count = 0 	for i = 1,32, 1 do 		if (player(i,'exists')) and (player(i,'team') ~= 0) then 			player_count = player_count + 1 		end 	end 	 	if (player_count < players) then 		for i = 1,players, 1 do 			parse('bot_add') 		end 	end 	 	if (player_count > players) then 	parse('bot_remove') 	end end
...which seems to work perfectly like I described above, but there is one little glitch that I don't care for:
If a human is in the game on a team, and then goes to spectator mode, ALL of the bots are kicked and a fresh new batch of bots are added (to equal out the teams)... thereby RESETTING the round (with the newly added bots).
Is there anything that I could modifiy in the second script so that if there is a human who is on one of the two teams, who then goes into spectator mode, the script will simply add another bot WITHOUT the round restarting?
Thanks in advance for any help