Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 |
//============================================================================== // Team Roster, UT2K4 style // Note: the first name in the RosterNames array is considered the Team Leader // // Written by Michiel Hendriks // (c) 2003, Epic Games, Inc. All Rights Reserved //============================================================================== class UT2K4TeamRoster extends xTeamRoster abstract; /** Description */ var localized string TeamDescription; /** Team voiceover */ var sound VoiceOver; /** Only the team name */ var sound TeamNameSound; /** Difficulty level */ var int TeamLevel; /** The team leader, if this is empty the first RosterNames is used */ var string TeamLeader; /** If TeamBots == 1 use the team leader, else use the default behavior */ function Initialize(int TeamBots) { local array<string> RosterOverride; local int i; if (UT2K4GameProfile(Level.Game.CurrentGameProfile) != none) { if (UT2K4GameProfile(Level.Game.CurrentGameProfile).GetAltTeamRoster(string(class), RosterOverride)) { RosterNames = RosterOverride; Roster.Length = RosterNames.length; for ( i = 0; i < RosterNames.Length; i++ ) { Roster[i] = class'xRosterEntry'.Static.CreateRosterEntryCharacter(RosterNames[i]); } } } if (TeamBots != 1) { Super.Initialize(TeamBots); return; } // else pick the team leader if (TeamLeader == "") TeamLeader = RosterNames[0]; Roster.Length = 1; Roster[0] = class'xRosterEntry'.Static.CreateRosterEntryCharacter(TeamLeader); Roster[0].PrecacheRosterFor(self); } function bool AddToTeam(Controller Other) { local SquadAI DMSquad; // if a team game use the default routine if (TeamGame(Level.Game) != none) return Super.AddToTeam(Other); // otherwise add fake squads if ( Bot(Other) != None ) { DMSquad = spawn(DeathMatch(Level.Game).DMSquadClass); DMSquad.AddBot(Bot(Other)); } Other.PlayerReplicationInfo.Team = None; return true; } defaultproperties { } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |