.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Re: bot donīt spawn
Old
  (#11)
cctnt
Guest
 
Status:
Posts: n/a
Default Re: bot donīt spawn - 26-04-2004

sry for bringing this old topic up again but i canīt get a rid of this bug

it now spawns in free fight but it doesnīt in team mod
maybe i when i post my botstart for my dll someone could help me

Code:
if (mod_id == NWN_DLL)
{
	 if ((pBot->start_action == MSG_TFC_IDLE) &&
		 (pBot->create_time + 3.0 <= gpGlobals->time))
	 {
		 pBot->start_action = MSG_TFC_TEAM_SELECT; // force team selection
	 }
	 // handle Team Fortress Classic stuff here...
	 if (pBot->start_action == MSG_TFC_TEAM_SELECT)
	 {
		 pBot->start_action = MSG_TFC_IDLE; // switch back to idle
		 pBot->create_time = gpGlobals->time; // reset
		 if ((pBot->bot_team != 1) && (pBot->bot_team != 2)) 
			pBot->bot_team = -1;
		 if (pBot->bot_team == -1)
 
for(index=1;index<=gpGlobals->maxClients;index++)
{
	pPlayer = INDEXENT(index);
}
 
		 retry_count = 0;
 
		 // select the team the bot wishes to join...
		 if (pBot->bot_team == 1)
			strcpy(c_team, "1");
		 else if (pBot->bot_team == 2)
			strcpy(c_team, "2");
		 else
			strcpy(c_team, "5");
		 FakeClientCommand(pEdict, "jointeam", c_team, NULL);
		 pBot->start_action = MSG_TFC_CLASS_SELECT;
		 return;
	 }
	 if (pBot->start_action == MSG_TFC_CLASS_SELECT)
	 { char *cvar_gamemode = (char *)CVAR_GET_STRING("mp_gamemode");
		 pBot->start_action = MSG_TFC_IDLE; // switch back to idle
		 pBot->create_time = gpGlobals->time; // reset
		 if ((pBot->bot_class < 0) || (pBot->bot_class > 8))
			pBot->bot_class = -1;
		 if (pBot->bot_class == -1)
			pBot->bot_class = RANDOM_LONG(0, 7);
		 team = UTIL_GetTeam(pEdict);
if ((cvar_gamemode && cvar_gamemode[0]) && (strncmp(cvar_gamemode, "1", 1) == 0))
		 {
if (pBot->bot_team == 1)
	{
	 if ((pBot->bot_class != 0)&&(pBot->bot_class != 1) && (pBot->bot_class != 2) && (pBot->bot_class != 3) )
	 {
	 if (RANDOM_LONG(1, 2) < 2)
	 pBot->bot_class = RANDOM_LONG(0, 3);
	 else
	 pBot->bot_class = RANDOM_LONG(4, 7);
	 }
	}
	else
	{
	 if ((pBot->bot_class != 4) && (pBot->bot_class != 5) && (pBot->bot_class != 6) && (pBot->bot_class != 7) )	 
	 {
	 int i = RANDOM_LONG(1, 3);
					 switch (i)
	 {
	 case 1:
		 pBot->bot_class = 0;
	 break;
	 case 2:
	 pBot->bot_class = 3;
	 break;
	 case 3:
	 pBot->bot_class = RANDOM_LONG(4, 7);
	 break;
	 default:
	 break;
	 }
	 }
	}
}
// select the class the bot wishes to use...
		 if (pBot->bot_class == 0)
			strcpy(c_class, "naruto");
		 else if (pBot->bot_class == 1)
			strcpy(c_class, "sasuke");
		 else if (pBot->bot_class == 2)
			strcpy(c_class, "kakashi");
		 else if (pBot->bot_class == 3)
			strcpy(c_class, "sakura");
		 else if (pBot->bot_class == 4)
			strcpy(c_class, "garaa");
		 else if (pBot->bot_class == 5)
			strcpy(c_class, "orichimaru");
		 else if (pBot->bot_class == 6)
			strcpy(c_class, "kankaru");
		 else if (pBot->bot_class == 7)
			strcpy(c_class, "temari");
else 
	 strcpy(c_class, "randompc");
		 FakeClientCommand(pEdict, c_class, NULL, NULL);
		 // bot has now joined the game (doesn't need to be started)
		 pBot->not_started = 0;
		 return;
	 }
}
else
{
	 // otherwise, don't need to do anything to start game...
	 pBot->not_started = 0;
}
someone that may help me?
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com