Talk:Server-Side Bots

From Valve Developer Community
Revision as of 04:25, 2 August 2008 by Railgun (talk | contribs)

Jump to: navigation, search

Any hints on how this could be used to implement the AI code in the HL2 codebase for multiplayer bots that are smart and shoot back? I'm no C++ guru, but I have figured out quite a bit. I just need a lead on where to start. -- CrazyMonkey

What I would do is edit the BotThink() function. -- Pon

Are there any bot coding communitys that work with this code?

Isn't the bot respawn code now implimented in a more recent SDK update? Certainly it is in my code without me adding it. If so, then it should be removed. -- [ICR]

Upon attempting to use the code in an orangebox hl2mp based mod I found that I had to make some changes to get a bot to actually spawn. The file game\server\hl2mp\hl2mp_bot_temp.cpp in the function *BotPutInServer has a commment that needs to be removed at the front of

//ClientPutInServer( pEdict, botname ); 

I also had to add the following in the same file. ( from sdk_bot_temp.cpp )

pPlayer->ChangeTeam( g_iNextBotTeam ); // to set team model.
pPlayer->RemoveAllItems( true );

best place was just before BotNumber++; --Railgun 21:25, 1 Aug 2008 (PDT)