Chimeric's supposed to be THE spot for UScript gurus, so I'll get the ball rolling here...
I've coded a little mutator in UScript which basically forces all team games to become Humans vs. Bots (REALLY fun at a Lan parties). I use the ModifyPlayer function to change a player's team depending on whether he's human or bot... human = blue team, bot = red team.
There's only one little problem, it's that when players want to change teams, they respawn in their new team but their spawn point is still in their previous team. So you can basically change from Blue to Red, and spawn in the Blue team's base as a Red guy.
Here's my code for bots:
if ((Other.IsA('Bot')) && (Other.PlayerReplicationInfo.Team != 0))
{
Level.Game.ChangeTeam(Other, 0);
// The following lines don't work...!!!
StartSpot = Level.Game.FindPlayerStart(Other, 0);
if (StartSpot != None)
Other.SetLocation(StartSpot.Location);
}
Any help would be appreciated.... thanks!
I've coded a little mutator in UScript which basically forces all team games to become Humans vs. Bots (REALLY fun at a Lan parties). I use the ModifyPlayer function to change a player's team depending on whether he's human or bot... human = blue team, bot = red team.
There's only one little problem, it's that when players want to change teams, they respawn in their new team but their spawn point is still in their previous team. So you can basically change from Blue to Red, and spawn in the Blue team's base as a Red guy.
Here's my code for bots:
if ((Other.IsA('Bot')) && (Other.PlayerReplicationInfo.Team != 0))
{
Level.Game.ChangeTeam(Other, 0);
// The following lines don't work...!!!
StartSpot = Level.Game.FindPlayerStart(Other, 0);
if (StartSpot != None)
Other.SetLocation(StartSpot.Location);
}
Any help would be appreciated.... thanks!