me vs. bots mutator woes

  • 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.

kodo

New Member
Apr 2, 2004
9
0
0
I'll keep this as short and to the point as possible.
First a UT2003 question...I tried this in an effort to make a teamgame with all bots on one team vs. me. The mutator does this, but the bots that get their team's changed go retarded. They basically stand there and do nothing. i'm guessing their AI isn't getting set, but I have no idea how to rectify the situation. Any help is welcome. Here is the code (its a bit messy cause i was trying a few different things):

class MutSpawn extends Mutator;

simulated event PreBeginPlay()
{
local TeamGame NewGame;
NewGame = TeamGame(Level.Game);

// Overrides the balance teams option
NewGame.bBalanceTeams = False;
NewGame.bPlayersBalanceTeams = False;
//Super.PreBeginPlay();
}


function ModifyPlayer (Pawn Other)
{
local NavigationPoint StartSpot;
local GameInfo G;

// If bot, make sure team is blue

if ((Other.Controller.PlayerReplicationInfo.bBot==true) &&
(Other.PlayerReplicationInfo.Team.TeamIndex != 1))
{
// Level.Game.ChangeTeam(Other.Controller, 1, true);
G = Level.Game;
TeamGame(G).ChangeTeam(Other.Controller,1,true);
Other.PlayerReplicationInfo.TeamID = 1;


// Level.TeamGame(Game).ChangeTeam(Other.Controller,1,true);
// Make sure the respawn point is in the blue base
StartSpot = Level.Game.FindPlayerStart(Other.Controller, 1);

if (StartSpot != None)
Other.SetLocation(StartSpot.Location);
}

// If human, make sure team is red

else if ((Other.Controller.PlayerReplicationInfo.bBot==false) &&
(Other.PlayerReplicationInfo.Team.TeamIndex != 0))
{
// Level.Game.ChangeTeam(Other.Controller, 0, true);
// Level.TeamGame(Game).ChangeTeam(Other.Controller,0,true);
G = Level.Game;
TeamGame(G).ChangeTeam(Other.Controller,0,true);
// Make sure the respawn point is in the red base
StartSpot = Level.Game.FindPlayerStart(Other.Controller, 0);

if (StartSpot != None)
Other.SetLocation(StartSpot.Location);
}

if (NextMutator != None) NextMutator.ModifyPlayer(Other);

}

defaultproperties
{
FriendlyName="Mutate Team"
Description="Eliminate Bots from Player Team"
}