Posts: 6,052
Threads: 429
Joined: Oct 2010
well when i see how fast you reply on several threads then its no wonder that it doesnt work cause you probably didnt even tested it Oo
Posts: 288
Threads: 24
Joined: Dec 2010
Reputation:
19
Doesn't work on bots spawned after match start using code.
crAyon makes no warranty with respect to documents or other information available from this place, assumes no legal liability or responsibility whatsoever for the accuracy, completeness, or usefulness of any such information, and does not represent that its use would not infringe privately owned rights. crAyon disclaims all warranties, express and implied, including the warranties of merchantability and fitness for a particular purpose.
Posts: 5,135
Threads: 241
Joined: Nov 2010
Reputation:
100
It should. You should always add bot.pers["isbot"] = true when you add a bot..
Posts: 288
Threads: 24
Joined: Dec 2010
Reputation:
19
C++ Code
mg_add_bots( numBots, team )
{
team = "allies";
for( i = 0; i < numBots ; i++ )
{
wait 0.50;
bot[i] = AddTestClient();
while(!IsDefined(bot[i]))
{
bot[i] = AddTestClient();
continue;
}
bot[i].origin = self.origin;
bot[i].angles = self.angles+ (0,180,0);
bot[i].pers[ "isBot" ] = true;
bot[i].name = "BOT [ " + i + " ]";
bot[i] thread maps\mp\gametypes\_bot::bot_spawn_think("allies");
bot[i] thread maps\mp\gametypes\_bot::bot_set_difficulty( "hard" );
bot[i] waittill("ok_to_loadout");
bot[i] takeAllWeapons();
currentWeapon = "knife_mp";
bot[i] giveWeapon( currentWeapon );
bot[i] SwitchToWeapon( currentWeapon );
bot[i] FreezeControls(false);
bot[i].maxhealth = 500;
bot[i].health = bot[i].maxhealth;
//bot[i] setmodel("infected_char_3");
bot[i].pers[ "team" ] = team;
bot[i].team = team;
bot[i].pers[ "savedmodel" ] = undefined;
bot[i].pers[ "teamTime" ] = 0;
bot[i].sessionteam = team;
bot[i].isInfected = false;
bot[i].isInfectedDef = false;
spawnPoint = bot[i] getSpawnPoint();
bot[i] SetOrigin( spawnPoint.origin );
bot[i] SetPlayerAngles( spawnPoint.angles);
bot[i] thread maps\mp\gametypes\_friendicons:<img src="https://www.itsmods.com/forum/images/smilies/confused.gif" alt="Confused" title="Confused" class="smilie smilie_13" />howFriendIcon();
buildhud();
bot[i].tag_stowed_back = undefined;
bot[i].tag_stowed_hip = undefined;
bot[i] SetAnim( %ch_under_b07_frantic_engineer_01 );
level.botCount++;
}
iPrintln("^1MINIGAME: ^7bots spawned, good luck!");
}
Not when spawned like this
crAyon makes no warranty with respect to documents or other information available from this place, assumes no legal liability or responsibility whatsoever for the accuracy, completeness, or usefulness of any such information, and does not represent that its use would not infringe privately owned rights. crAyon disclaims all warranties, express and implied, including the warranties of merchantability and fitness for a particular purpose.
Posts: 5,135
Threads: 241
Joined: Nov 2010
Reputation:
100
You set
'bot[i].pers[ "isBot" ] = true'
so it will work lol
Posts: 288
Threads: 24
Joined: Dec 2010
Reputation:
19
Try it
crAyon makes no warranty with respect to documents or other information available from this place, assumes no legal liability or responsibility whatsoever for the accuracy, completeness, or usefulness of any such information, and does not represent that its use would not infringe privately owned rights. crAyon disclaims all warranties, express and implied, including the warranties of merchantability and fitness for a particular purpose.