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

UT2k4Assault.Message_AssaultTeamRole


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
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
//==============================================================================
// Message_AssaultTeamRole
//==============================================================================
//	Created by Laurent Delayen
//	© 2003, Epic Games, Inc.  All Rights Reserved
//==============================================================================

class Message_AssaultTeamRole extends LocalMessage;


var localized string	Message_PostLogin_Attacker, Message_PostLogin_Defender;
var name				TeamSounds[2];

var Color	BlueColor, RedColor;


static function ClientReceive( 
    PlayerController P,
    optional int Switch,
    optional PlayerReplicationInfo RelatedPRI_1, 
    optional PlayerReplicationInfo RelatedPRI_2,
    optional Object OptionalObject
    )
{
	local GameObjective GO;
	local bool			bNotify;

	super.ClientReceive( P,Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject );

	if ( P.myHUD != None && P.myHUD.IsA('HUD_Assault') )
	{
		HUD_Assault(P.myHUD).CurrentObjective = None;	// force update
		GO		= HUD_Assault(P.myHUD).GetCurrentObjective();
		bNotify = HUD_Assault(P.myHUD).CanSpawnNotify();
	}

	if ( bNotify )
	{
		switch ( Switch )
		{
			case 0 : P.QueueAnnouncement( default.TeamSounds[0], 2, AP_InstantPlay ); break;
			case 1 : P.QueueAnnouncement( default.TeamSounds[1], 2, AP_InstantPlay ); break;
		}

		AnnounceCurrentObjective( P, GO, Switch == 0 );
	}		
	else
		AnnounceCurrentObjective( P, None, Switch == 0 );
}

static function string GetString(
    optional int Switch,
    optional PlayerReplicationInfo RelatedPRI_1, 
    optional PlayerReplicationInfo RelatedPRI_2,
    optional Object OptionalObject
    )
{
	switch ( Switch )
	{
		case 0 : return default.Message_PostLogin_Attacker;
		case 1 : return default.Message_PostLogin_Defender;
	}
}

static function color GetColor(
    optional int Switch,
    optional PlayerReplicationInfo RelatedPRI_1, 
    optional PlayerReplicationInfo RelatedPRI_2
    )
{
	if ( (RelatedPRI_1 != None) && (RelatedPRI_1.Team != None) )
	{
		if ( RelatedPRI_1.Team.TeamIndex == 0 )
			return default.RedColor;
		else
			return default.BlueColor;
	}
	else
		return default.DrawColor;
}

static function AnnounceCurrentObjective( PlayerController PC, GameObjective GO, bool bAttacking )
{
	local Sound	Announcer;

	if ( GO != None && GO.IsActive() && !GO.bOptionalObjective )
	{
		if ( bAttacking )
			Announcer = GO.Announcer_ObjectiveInfo;
		else
			Announcer = GO.Announcer_DefendObjective;
	}

	if ( Announcer != None )
		PC.QueueAnnouncement( Announcer.Name, 1, AP_NoDuplicates, 200 );
	else
		PC.QueueAnnouncement( '', 1, AP_NoDuplicates, 201 );	// Simple objective highlight
}

defaultproperties
{
	bIsConsoleMessage=false
	bFadeMessage=true
	bIsSpecial=true
	bIsUnique=true
	Lifetime=3
	bBeep=false

    DrawColor=(R=255,G=255,B=255,A=255)
	BlueColor=(R=0,G=0,B=255,A=255)
	RedColor=(R=255,G=0,B=0,A=255)

	StackMode=SM_Down
    PosY=0.33
	Message_PostLogin_Attacker="You are Attacking!!"
	Message_PostLogin_Defender="You are Defending!!"
	TeamSounds(0)=You_are_attacking
	TeamSounds(1)=You_are_defending
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Di 5.9.2006 22:36:14.000 - Creation time: Do 14.8.2014 09:58:44.524 - Created with UnCodeX