AddBot

From King Arthur's Gold Wiki
Revision as of 17:06, 10 September 2012 by Shadlington (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Adds a bot to the game, with the given name. Returns a reference to the bot's CPlayer object.

CPlayer@ AddBot( const string &name )

Usage example, in which saying '!bot' in the chat will cause a bot called Henry to be created:

void ProcessChat( CRules@ this, string text, CPlayer@ player ) 
if (text == "!bot")
{
  CPlayer@ bot = AddBot( "Henry" );
}