Botpack
Class DeathMatchMessage

source: e:\games\UnrealTournament\Botpack\Classes\DeathMatchMessage.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Info
         |
         +--Engine.LocalMessage
            |
            +--Botpack.LocalMessagePlus
               |
               +--Botpack.CriticalEventPlus
                  |
                  +--Botpack.DeathMatchMessage
Direct Known Subclasses:None

class DeathMatchMessage
extends Botpack.CriticalEventPlus

// // Messages common to DeathMatchPlus derivatives. // // Switch 0: OverTime // // Switch 1: Entered game. // RelatedPRI_1 is the player. // // Switch 2: Name change. // RelatedPRI_1 is the player. // // Switch 3: Team change. // RelatedPRI_1 is the player. // OptionalObject is a TeamInfo. // // Switch 4: Left game. // RelatedPRI_1 is the player.
Variables
 string GlobalNameChange
 string NewTeamMessage
 string NewTeamMessageTrailer
 string OvertimeMessage


Function Summary
 string GetString(optional int, optional PlayerReplicationInfo, optional PlayerReplicationInfo, optional Object)



Source Code


00001	//
00002	// Messages common to DeathMatchPlus derivatives.
00003	//
00004	// Switch 0: OverTime
00005	//
00006	// Switch 1: Entered game.
00007	//	RelatedPRI_1 is the player.
00008	//
00009	// Switch 2: Name change.
00010	//	RelatedPRI_1 is the player.
00011	//
00012	// Switch 3: Team change.
00013	//	RelatedPRI_1 is the player.
00014	//	OptionalObject is a TeamInfo.
00015	//
00016	// Switch 4: Left game.
00017	//	RelatedPRI_1 is the player.
00018	
00019	
00020	class DeathMatchMessage expands CriticalEventPlus;
00021	
00022	var localized string OvertimeMessage;
00023	var localized string GlobalNameChange;
00024	var localized string NewTeamMessage;
00025	var localized string NewTeamMessageTrailer;
00026	
00027	static function string GetString(
00028		optional int Switch,
00029		optional PlayerReplicationInfo RelatedPRI_1, 
00030		optional PlayerReplicationInfo RelatedPRI_2,
00031		optional Object OptionalObject
00032		)
00033	{
00034		switch (Switch)
00035		{
00036			case 0:
00037				return Default.OverTimeMessage;
00038				break;
00039			case 1:
00040				if (RelatedPRI_1 == None)
00041					return "";
00042	
00043				return RelatedPRI_1.PlayerName$class'GameInfo'.Default.EnteredMessage;
00044				break;
00045			case 2:
00046				if (RelatedPRI_1 == None)
00047					return "";
00048	
00049				return RelatedPRI_1.OldName@Default.GlobalNameChange@RelatedPRI_1.PlayerName;
00050				break;
00051			case 3:
00052				if (RelatedPRI_1 == None)
00053					return "";
00054				if (OptionalObject == None)
00055					return "";
00056	
00057				return RelatedPRI_1.PlayerName@Default.NewTeamMessage@TeamInfo(OptionalObject).TeamName$Default.NewTeamMessageTrailer;
00058				break;
00059			case 4:
00060				if (RelatedPRI_1 == None)
00061					return "";
00062	
00063				return RelatedPRI_1.PlayerName$class'GameInfo'.Default.LeftMessage;
00064				break;
00065		}
00066		return "";
00067	}
00068	
00069	defaultproperties
00070	{
00071	     OvertimeMessage="Score tied at the end of regulation. Sudden Death Overtime!!!"
00072	     GlobalNameChange="changed name to"
00073	     NewTeamMessage="is now on"
00074	}

End Source Code