Adding a custom bot to a team

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

bigsandwich

New Member
Jan 13, 2006
3
0
0
I'm working on a mod based on Onslaught and am trying to add one "god" bot per team when the match starts. Here's a snippet:

Code:
class GWModGame extends ONSOnslaughtGame;

var bool redGodCreated;
var bool blueGodCreated;

function Bot SpawnBot(optional string botName)
{
	local Bot B;

	B = Super.SpawnBot(botName);

	if(B != None)
	{
		if(!redGodCreated && B.Pawn.PlayerReplicationInfo.Team.TeamIndex == 0)
		{
			B.PawnClass = class'GWMod.GWGod';
			redGodCreated = true;
			log("**********RED GOD SPAWNED****************");
		}
		else if(!blueGodCreated && B.Pawn.PlayerReplicationInfo.Team.TeamIndex == 1)
		{
			B.PawnClass = class'GWMod.GWGod';
			blueGodCreated = true;
			log("**********BLUE GOD SPAWNED**************");
		}
	}

	return B;
}

But this doesn't work. I get blue a god, no red god and the "red god created" message in the log. I think this is because the bot I'm getting from spawn bot has not been assigned a team yet. Could someone tell me how to go about this?
 

bigsandwich

New Member
Jan 13, 2006
3
0
0
No, he's actually supposed to be giant (10x normal size right now), and is suppposed have an are of effect attack (modification of the ion cannon, which isn't implemented yet).
 
Last edited: