Ni3ls
8th July 2015, 16:21
Hi all,
I'm recreating a zom mod based on Paulus. To test I need some bots.
So I added this in Callback_StartGameType()
thread maps\mp\gametypes\_teams::addTestClients();
I thought that was the only thing needed to add bots with
set scr_testclients NUMBER.
However, they join the game, but don't pick a side. From default _teams.gsc
addTestClients()
{
wait 5;
for(;;)
{
if(getCvarInt("scr_testclients") > 0)
break;
wait 1;
}
testclients = getCvarInt("scr_testclients");
for(i = 0; i < testclients; i++)
{
ent[i] = addtestclient();
if(i & 1)
team = "axis";
else
team = "allies";
ent[i] thread TestClient(team);
}
}
TestClient(team)
{
while(!isdefined(self.pers["team"]))
wait .05;
self notify("menuresponse", game["menu_team"], team);
wait 0.5;
if(team == "allies")
self notify("menuresponse", game["menu_weapon_allies"], "m1carbine_mp");
else if(team == "axis")
self notify("menuresponse", game["menu_weapon_axis"], "mp40_mp");
}
However, I'm not using the default menu's for allies and axis anymore. So is there a way to spawn them instantly? I thought with setting their weapon, team and model manually, but no result and no error
I'm recreating a zom mod based on Paulus. To test I need some bots.
So I added this in Callback_StartGameType()
thread maps\mp\gametypes\_teams::addTestClients();
I thought that was the only thing needed to add bots with
set scr_testclients NUMBER.
However, they join the game, but don't pick a side. From default _teams.gsc
addTestClients()
{
wait 5;
for(;;)
{
if(getCvarInt("scr_testclients") > 0)
break;
wait 1;
}
testclients = getCvarInt("scr_testclients");
for(i = 0; i < testclients; i++)
{
ent[i] = addtestclient();
if(i & 1)
team = "axis";
else
team = "allies";
ent[i] thread TestClient(team);
}
}
TestClient(team)
{
while(!isdefined(self.pers["team"]))
wait .05;
self notify("menuresponse", game["menu_team"], team);
wait 0.5;
if(team == "allies")
self notify("menuresponse", game["menu_weapon_allies"], "m1carbine_mp");
else if(team == "axis")
self notify("menuresponse", game["menu_weapon_axis"], "mp40_mp");
}
However, I'm not using the default menu's for allies and axis anymore. So is there a way to spawn them instantly? I thought with setting their weapon, team and model manually, but no result and no error