Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Betrayal.BetrayalSpecialKillMessage


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
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
/******************************************************************************
BetrayalSpecialKillMessage

Creation date: 2011-03-13 18:08
Last change: $Id$
Copyright (c) 2011, Wormbo
******************************************************************************/

class BetrayalSpecialKillMessage extends SpecialKillMessage abstract;


//=============================================================================
// Imports
//=============================================================================

#exec audio import file=Sounds\Impressive.wav


//=============================================================================
// Localization
//=============================================================================

var localized string DecapitationByString;
var localized string ImpressiveString;
var localized string EagleEyeString;


//=============================================================================
// Properties
//=============================================================================

var Sound ImpressiveAnnouncement;


/**
Return special kill message string.
*/
static function string GetString(optional int MessageSwitch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject)
{
	switch (MessageSwitch) {
	case 0:
		if (RelatedPRI_1 != None)
			return Repl(default.DecapitationByString, "%k", RelatedPRI_1.PlayerName, true);

		return default.DecapitationString;

	case 1:
		return default.EagleEyeString;

	default:
		return Repl(default.ImpressiveString, "%n", MessageSwitch, true);
	}
}


/**
Play corresponding announcement.
*/
static function ClientReceive(PlayerController P, optional int MessageSwitch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject)
{
	Super(LocalMessage).ClientReceive(P, MessageSwitch, RelatedPRI_1, RelatedPRI_2, OptionalObject);

	switch (MessageSwitch) {
	case 0:
		P.PlayRewardAnnouncement('HeadShot', 1);
		break;

	case 1:
		P.PlayRewardAnnouncement('EagleEye', 1);
		break;

	default:
		P.PlayAnnouncement(default.ImpressiveAnnouncement, 1);
	}
}


/**
Increased font size for multi hits on 3 or more players.
*/
static function int GetFontSize(int MessageSwitch, PlayerReplicationInfo RelatedPRI1, PlayerReplicationInfo RelatedPRI2, PlayerReplicationInfo LocalPlayer)
{
	if (MessageSwitch > 2)
		return 1;
	return 0;
}


//=============================================================================
// Default properties
//=============================================================================

defaultproperties
{
	bFadeMessage       = True
	bIsSpecial         = True
	bIsUnique          = True
	bIsPartiallyUnique = True
	Lifetime           = 3
	bBeep              = False
	DrawColor          = (R=255,G=0,B=0,A=255)
	StackMode          = SM_Down
	PosY               = 0.10

	DecapitationByString = "Head Shot by %k !!"
	ImpressiveString     = "%n Hits, Impressive!"
	EagleEyeString       = "Eagle Eye!"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: So 13.3.2011 19:33:32.000 - Creation time: Do 14.8.2014 09:58:35.008 - Created with UnCodeX