Botpack
Class KillingSpreeMessage

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

class KillingSpreeMessage
extends Botpack.CriticalEventLowPlus

// // Switch is the note. // RelatedPRI_1 is the player on the spree. //

Function Summary
 
simulated
ClientReceive(PlayerPawn P, optional int, optional PlayerReplicationInfo, optional PlayerReplicationInfo, optional Object)
 string GetString(optional int, optional PlayerReplicationInfo, optional PlayerReplicationInfo, optional Object)



Source Code


00001	//
00002	// Switch is the note.
00003	// RelatedPRI_1 is the player on the spree.
00004	//
00005	class KillingSpreeMessage expands CriticalEventLowPlus;
00006	
00007	var(Messages)	localized string EndSpreeNote, EndSelfSpree, EndFemaleSpree, MultiKillString;
00008	var(Messages)	localized string SpreeNote[10];
00009	var(Messages)	sound SpreeSound[10];
00010	var(Messages)	localized string EndSpreeNoteTrailer;
00011	 
00012	static function string GetString(
00013		optional int Switch,
00014		optional PlayerReplicationInfo RelatedPRI_1, 
00015		optional PlayerReplicationInfo RelatedPRI_2,
00016		optional Object OptionalObject
00017		)
00018	{
00019		if (RelatedPRI_2 == None)
00020		{
00021			if (RelatedPRI_1 == None)
00022				return "";
00023	
00024			if (RelatedPRI_1.PlayerName != "")
00025				return RelatedPRI_1.PlayerName@Default.SpreeNote[Switch];
00026		} 
00027		else 
00028		{
00029			if (RelatedPRI_1 == None)
00030			{
00031				if (RelatedPRI_2.PlayerName != "")
00032				{
00033					if ( RelatedPRI_2.bIsFemale )
00034						return RelatedPRI_2.PlayerName@Default.EndFemaleSpree;
00035					else
00036						return RelatedPRI_2.PlayerName@Default.EndSelfSpree;
00037				}
00038			} 
00039			else 
00040			{
00041				return RelatedPRI_1.PlayerName$Default.EndSpreeNote@RelatedPRI_2.PlayerName@Default.EndSpreeNoteTrailer;
00042			}
00043		}
00044		return "";
00045	}
00046	
00047	static simulated function ClientReceive( 
00048		PlayerPawn P,
00049		optional int Switch,
00050		optional PlayerReplicationInfo RelatedPRI_1, 
00051		optional PlayerReplicationInfo RelatedPRI_2,
00052		optional Object OptionalObject
00053		)
00054	{
00055		Super.ClientReceive(P, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject);
00056	
00057		if (RelatedPRI_2 != None)
00058			return;
00059	
00060		if (RelatedPRI_1 != P.PlayerReplicationInfo)
00061		{
00062			P.PlaySound(sound'SpreeSound',, 4.0);
00063			return;
00064		}
00065		P.ClientPlaySound(Default.SpreeSound[Switch],, true);
00066	
00067	}
00068	
00069	defaultproperties
00070	{
00071	     EndSpreeNote="'s killing spree was ended by"
00072	     EndSelfSpree="was looking good till he killed himself!"
00073	     EndFemaleSpree="was looking good till she killed herself!"
00074	     spreenote(0)="is on a killing spree!"
00075	     spreenote(1)="is on a rampage!"
00076	     spreenote(2)="is dominating!"
00077	     spreenote(3)="is unstoppable!"
00078	     spreenote(4)="is Godlike!"
00079	     SpreeSound(0)=Sound'Announcer.(All).killingspree'
00080	     SpreeSound(1)=Sound'Announcer.(All).rampage'
00081	     SpreeSound(2)=Sound'Announcer.(All).dominating'
00082	     SpreeSound(3)=Sound'Announcer.(All).unstoppable'
00083	     SpreeSound(4)=Sound'Announcer.(All).godlike'
00084	     bBeep=False
00085	}

End Source Code