XIIIMP
Class XIIIMPCTFMessage

source: C:\XIII\XIIIMP\Classes\XIIIMPCTFMessage.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Info
         |
         +--Engine.LocalMessage
            |
            +--XIII.XIIILocalMessage
               |
               +--XIIIMP.XIIIMPCTFMessage
Direct Known Subclasses:None

class XIIIMPCTFMessage
extends XIII.XIIILocalMessage

// // CTF Messages // // 0: Capture Message. RelatedPRI_1 is the scorer. OptionalObject is the flag. // 1: Return Message. RelatedPRI_1 is the scorer. OptionalObject is the flag. // 2: Dropped Message. RelatedPRI_1 is the holder. OptionalObject is the flag's team teaminfo. // 3: Was Returned Message. OptionalObject is the flag's team teaminfo. // 4: Has the flag. RelatedPRI_1 is the holder. OptionalObject is the flag's team teaminfo. // 5: Auto Send Home. OptionalObject is the flag's team teaminfo. // 6: Pickup stray. RelatedPRI_1 is the holder. OptionalObject is the flag's team teaminfo.
Variables
 CaptureBlue, CaptureRed
 DroppedBlue, DroppedRed
 string HasBlue,HasRed
 ReturnBlue, ReturnRed
 ReturnedBlue, ReturnedRed


Function Summary
 int GetFontSize(int Switch)
     
{
     return (Default.YPos/768.0) * ClipY;
}

static 
 float GetOffset(int Switch, float YL, float ClipY)
     
/*static 
 string GetString(optional int, optional PlayerReplicationInfo, optional PlayerReplicationInfo, optional Object)



Source Code


00001	//
00002	// CTF Messages
00003	//
00004	// 0: Capture Message. RelatedPRI_1 is the scorer. OptionalObject is the flag.
00005	// 1: Return Message. RelatedPRI_1 is the scorer. OptionalObject is the flag.
00006	// 2: Dropped Message. RelatedPRI_1 is the holder. OptionalObject is the flag's team teaminfo.
00007	// 3: Was Returned Message. OptionalObject is the flag's team teaminfo.
00008	// 4: Has the flag. RelatedPRI_1 is the holder. OptionalObject is the flag's team teaminfo.
00009	// 5: Auto Send Home. OptionalObject is the flag's team teaminfo.
00010	// 6: Pickup stray. RelatedPRI_1 is the holder. OptionalObject is the flag's team teaminfo.
00011	
00012	class XIIIMPCTFMessage extends XIIILocalMessage;
00013	
00014	var localized string ReturnBlue, ReturnRed;
00015	var localized string ReturnedBlue, ReturnedRed;
00016	var localized string CaptureBlue, CaptureRed;
00017	var localized string DroppedBlue, DroppedRed;
00018	var localized string HasBlue,HasRed;
00019	
00020	static function string GetString(
00021	     optional int Switch,
00022	     optional PlayerReplicationInfo RelatedPRI_1,
00023	     optional PlayerReplicationInfo RelatedPRI_2,
00024	     optional Object OptionalObject
00025	     )
00026	{
00027	     switch (Switch)
00028	     {
00029	          case 0:
00030	               if (RelatedPRI_1 == None)
00031	                    return "";
00032	               if ( XIIIMPFlag(OptionalObject) == None )
00033	                    return "";
00034	
00035	               if ( XIIIMPFlag(OptionalObject).Team.TeamIndex == 0 )
00036	                    return Default.CaptureRed;
00037	               else
00038	                    return Default.CaptureBlue;
00039	               break;
00040	
00041	          // Returned the flag.
00042	          case 1:
00043	               if ( XIIIMPFlag(OptionalObject) == None )
00044	                    return "";
00045	               if (RelatedPRI_1 == None)
00046	               {
00047	                    if ( XIIIMPFlag(OptionalObject).Team.TeamIndex == 1 )
00048	                         return Default.ReturnedRed;
00049	                    else
00050	                         return Default.ReturnedBlue;
00051	               }
00052	               if ( XIIIMPFlag(OptionalObject).Team.TeamIndex == 0 )
00053	                    return RelatedPRI_1.PlayerName@Default.ReturnRed;
00054	               else
00055	                    return RelatedPRI_1.playername@Default.ReturnBlue;
00056	               break;
00057	
00058	          // Dropped the flag.
00059	          case 2:
00060	               if (RelatedPRI_1 == None)
00061	                    return "";
00062	               if ( TeamInfo(OptionalObject) == None )
00063	                    return "";
00064	
00065	               if ( TeamInfo(OptionalObject).TeamIndex == 0 )
00066	                    return RelatedPRI_1.playername@Default.DroppedRed;
00067	               else
00068	                    return RelatedPRI_1.playername@Default.DroppedBlue;
00069	               break;
00070	
00071	          // Was returned.
00072	          case 3:
00073	               if ( TeamInfo(OptionalObject) == None )
00074	                    return "";
00075	
00076	               if ( TeamInfo(OptionalObject).TeamIndex == 0 )
00077	                    return Default.ReturnedRed;
00078	               else
00079	                    return Default.ReturnedBlue;
00080	               break;
00081	
00082	          // Has the flag.
00083	          case 4:
00084	               if (RelatedPRI_1 == None)
00085	                    return "";
00086	               if ( TeamInfo(OptionalObject) == None )
00087	                    return "";
00088	
00089	               if ( TeamInfo(OptionalObject).TeamIndex == 0 )
00090	                    return RelatedPRI_1.playername@Default.HasRed;
00091	               else
00092	                    return RelatedPRI_1.playername@Default.HasBlue;
00093	               break;
00094	
00095	          // Auto send home.
00096	          case 5:
00097	               if ( TeamInfo(OptionalObject) == None )
00098	                    return "";
00099	
00100	               if ( TeamInfo(OptionalObject).TeamIndex == 0 )
00101	                    return Default.ReturnedRed;
00102	               else
00103	                    return Default.ReturnedBlue;
00104	               break;
00105	
00106	          // Pickup
00107	          case 6:
00108	               if (RelatedPRI_1 == None)
00109	                    return "";
00110	               if ( TeamInfo(OptionalObject) == None )
00111	                    return "";
00112	
00113	               if ( TeamInfo(OptionalObject).TeamIndex == 0 )
00114	                    return RelatedPRI_1.playername@Default.HasRed;
00115	               else
00116	                    return RelatedPRI_1.playername@Default.HasBlue;
00117	               break;
00118	     }
00119	     return "";
00120	}
00121	
00122	
00123	/*static function float GetOffset(int Switch, float YL, float ClipY )
00124	{
00125	     return (Default.YPos/768.0) * ClipY;
00126	}
00127	
00128	static function int GetFontSize(int Switch)
00129	{
00130	     return Default.FontSize;
00131	}*/
00132	
00133	
00134	
00135	
00136	defaultproperties
00137	{
00138	     ReturnBlue="returns the blue flag"
00139	     ReturnRed="returns the red flag"
00140	     ReturnedBlue="The blue flag was returned"
00141	     ReturnedRed="The red flag was returned"
00142	     CaptureBlue="The red team scores"
00143	     CaptureRed="The blue team scores"
00144	     DroppedBlue="dropped the blue flag"
00145	     DroppedRed="dropped the red flag"
00146	     HasBlue="has the blue flag"
00147	     HasRed="has the red flag"
00148	     DrawColor=(B=168,R=255,A=230)
00149	}

End Source Code