I'm a doctor, not a mechanic

Legacy:Team Number

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

Overview[edit]

In the Unreal series of games, teams in team games (CTF, DOM etc) are all assigned a number. This number corresponds to their color, and is used inside of some gametypes to do things like Bot Support, with settings on GameObjectives, etc., PlayerStart assignment and just about everything else team-related.

Team Number Index[edit]

The team indexes are as follows:

Number Color
0 Red
1 Blue
2 Green
3 Yellow/Gold
255 No Team

Notes[edit]

  • On some GameObjectives, properties are defined as Defender TeamIndex or Attacker Team Index.
  • In UT2003, there's only support for two teams, red and blue, so 2, 3 and 255 won't mean anything. ... 255 is used in some Epic 2003 classes to mean "no team" or Neutral.
  • A setting of "no team" can mean "no team" or "all teams" depending on the context. A Pawn or Controller with "no team" is everyone's enemy. A playerstart with "no team" is availible to all players.
  • In team games, players with "no team" will be autoassigned to a team.
  • We're not sure what the indexes were in Unreal 1.

Force Team Spawning[edit]

In Team Deathmatch, PlayerStart.TeamNumber properties are ignored during player spawning. This is because the gametype uses DM maps, which aren't team based, and therefore normally have no team-designated PlayerStarts. However, this can be overwritten with a custom Actor that alters TeamGame during PreBeginPlay(). To implement this custom Actor in your map, Create A Subclass and use the following code.

TeamSpawn[edit]

UT2003 :: Actor >> TeamSpawn (custom)
//=============================================================================
// TeamSpawn.
// Forces player spawning based on PlayerStart -> TeamNumber if a Team Game.
//=============================================================================
class TeamSpawn extends Actor
    placeable;
 
var() bool bForceTeamSpawn ;   // Will check PlayerStart -> TeamNumber 
 
simulated function PreBeginPlay()
{
  if ( bForceTeamSpawn )
    if ( Level != None && Level.Game != None && Level.Game.IsA('TeamGame') )
      TeamGame( Level.Game ).bSpawnInTeamArea = true;
  Super.PreBeginPlay();
  Destroy();
}

Related Topics[edit]

Discussion[edit]

DarkArchangel: Sorry, but I'm quite unfamiliar with 'editing' pages like this. I'm also new to the UnrealEd, and i got stuck in my TDM level, because the spawn points got mixed up. Then I saw this script, but because I'm very new to UnrealEd, I haven't got any idea how to implement that script into my level. Do you think one of you could one of you explain it step to step to me? I would be really thankfull for that.

SuperApe: I hope this long overdue update and refactor helps DarkArchangel out. :)