I love the smell of UnrealEd crashing in the morning. – tarquin

Legacy:Team Number

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 19:29, 28 December 2005 by SuperApe (Talk)

Jump to: navigation, search

Overview

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

The team indexes are as follows:

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

Notes

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

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 overridden with a custom Actor that alters TeamGame during PreBeginPlay(). To implement this code in your map, Create A Subclass and use the following code.

TeamSpawn

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

Discussion

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. :)