XIII
Class MapInfo

source: C:\XIII\XIII\Classes\MapInfo.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Info
         |
         +--XIII.MapInfo
Direct Known Subclasses:BarFight, Map01_Plage, Map02_Banque, Map03_Amos, Map04_Toits, Map05_Heliport, Map06_HualparBase, Map07_Kellownee, Map08_PlainRock, Map09_Spads, Map10_Base, Map11_SousMarin, Map12_PortUSA, Map13_Aquarium, Map14_Palace, Map15_Sanctuaire, Map16_SSH1, Map17_Epilogue, MapMenu, MapTest, MapTestEric, MapCredits, ToitsFocus

class MapInfo
extends Engine.Info

//============================================================================= // //=============================================================================
Variables
 bool DBObjectives
 array DialogToSave
           The structure that would be saved on disk
 array DlgMgr
           this map dialog managers
 bool EndCartoonEffect
           Keep the inventory (Weapons/items) in the next map
 XIIIPawn FakePawn
           The pawn that will own our inventory until we're back
 string GoalText
           the item we had selected when going into flash
 float MemFOVBeforeFlash
           (Pawn) this map speakers -PawnName-, separated by "none"
 Texture NextLoadScreen
           Next map to launch of objectives complete
 bool NextMapKeepInventory
           Keep the inventory (Weapons/items) in the next map
 string NextMapLevelWithUnr
           Next map to launch of objectives complete
 array PotentialNMi
           Keep the inventory (Weapons/items) in the next map
 Powerups SelectedItemBeforeFlash
           the item we had selected when going into flash
 Lineind, Speakerind
           this map dialog managers
 array Speakers
           (Pawn) this map speakers -PawnName-, separated by "none"
 string TexteDuBriefing
           Next map to launch of objectives complete
 int WeaponBeforeFlash
           the weapon id we had in hand when going into flash
 XIIIPlayerController XIIIController
           Keep the inventory (Weapons/items) in the next map
 XIIIPawn XIIIPawn
           Keep the inventory (Weapons/items) in the next map
 DialIndex _Dial
           this map dialog managers
 bool bAntiGoal
           the item we had selected when going into flash
 bool bBriefing
           Do we have a briefing
 bool bCompleted
           the item we had selected when going into flash
 bool bFirstTime
           Keep the inventory (Weapons/items) in the next map
 bool bLevelComplete
           Keep the inventory (Weapons/items) in the next map
 bool bPrimary
           the item we had selected when going into flash
 float checkTime
           Keep the inventory (Weapons/items) in the next map
 array sAllSentences
           Sentences for this map, separated by "scene"
 string sIncompleteGoal
           the item we had selected when going into flash


Function Summary
 void CloseDoor(XIIIMover P, bool bLock)
     
//_____________________________________________________________________________
 void DisplayGoal(int N, optional bool)
     
//_____________________________________________________________________________
// Send goal to display
 void DoTravel()
     
//_____________________________________________________________________________
 XIIIPlayerController FindPlayerController()
     
//_____________________________________________________________________________
 void FirstFrame()
     
//_____________________________________________________________________________
 void GeneratedPawn(Actor Generator, Pawn Other)
     
//_____________________________________________________________________________
// tell self that a pawn has been generated (to be taken into account if necessary)
 void PostBeginPlay()
     
//_____________________________________________________________________________
 void PostRender(Canvas C)
     
//_____________________________________________________________________________
 bool RestoreInventoryAfterFlash(XIIIPawn P)
     
//_____________________________________________________________________________
// Restore the player's inventory after a flashback
 bool SaveInventoryForFlash(XIIIPawn P)
     
//_____________________________________________________________________________
// Save the player's inventory to give him whatever we want in a flashback
 void SetGoalComplete(int N)
     
//_____________________________________________________________________________
 void SetPrimaryGoal(int N)
     
//_____________________________________________________________________________
// Goal Become primary
 void SetSecondaryGoal(int N)
     
//_____________________________________________________________________________
// Goal is not primary anymore
 void SetUpInitialInventory(XIIIPawn P)
     
//_____________________________________________________________________________
 void TestGoalComplete()
     
//_____________________________________________________________________________
 void Timer()
     
//_____________________________________________________________________________



Source Code


00001	//=============================================================================
00002	//
00003	//=============================================================================
00004	class MapInfo extends Info
00005	    abstract;
00006	
00007	#exec Texture Import File=Textures\mapinfo_ico.tga Name=MapInfo_ico Mips=Off
00008	#exec OBJ LOAD FILE=XIIICine.utx PACKAGE=XIIICine
00009	
00010	var bool DBObjectives;
00011	var() bool bBriefing;                                   // Do we have a briefing
00012	var() bool NextMapKeepInventory;                        // Keep the inventory (Weapons/items) in the next map
00013	var bool bLevelComplete;
00014	var bool bFirstTime;
00015	var bool EndCartoonEffect;
00016	
00017	var() array<xiiipawn> PotentialNMi;
00018	
00019	var(Shadows) int MaxTraceDistance;
00020	var(Shadows) int ShadowIntensity;
00021	var(Shadows) float ShadowMaxDist;
00022	var(Shadows) float ShadowTransDist;
00023	var float checkTime;
00024	var XIIIPlayerController XIIIController;
00025	var XIIIPawn XIIIPawn;
00026	
00027	// ELR Memorize things for flashbacks
00028	//var FakeXIIIPawn FakePawn;              // The pawn that will own our inventory until we're back
00029	var XIIIPawn FakePawn;              // The pawn that will own our inventory until we're back
00030	
00031	var int WeaponBeforeFlash;              // the weapon id we had in hand when going into flash
00032	var PowerUps SelectedItemBeforeFlash;   // the item we had selected when going into flash
00033	
00034	// Goal handling
00035	struct XIIIGoals
00036	{
00037	    var() string GoalText;
00038	    var bool bCompleted;
00039	    var() bool bPrimary;
00040	    var() bool bAntiGoal;
00041	};
00042	
00043	var(Objectifs) localized array<XIIIGoals> Objectif;
00044	var(Objectifs) localized array<string> MessageGameOver;
00045	var(Objectifs) localized string MessageMissionSuccess;
00046	
00047	var string sIncompleteGoal;
00048	
00049	var(Equipement) array< class<Inventory> > InitialInv;   // Inventory to give at the map start
00050	var() string NextMapLevelWithUnr;                       // Next map to launch of objectives complete
00051	var() texture NextLoadScreen;
00052	
00053	var() localized string TexteDuBriefing;
00054	var(NextMap) array<name> InventoryToDestroyBeforeNextMap;
00055	var(NextMap) string EndMapVideo;
00056	
00057	
00058	// MLK: Following vars are used to record spoken dialogs & to be able to consult the in the menu
00059	var array<info> DlgMgr;     // this map dialog managers
00060	
00061	struct DialIndex
00062	{
00063	    var byte Lineind, Speakerind;
00064	};
00065	
00066	var DialIndex _Dial;
00067	var array<DialIndex> DialogToSave; // The structure that would be saved on disk
00068	var array<string> sAllSentences; // Sentences for this map, separated by "scene"
00069	var array<string> Speakers; // (Pawn) this map speakers -PawnName-, separated by "none"
00070	
00071	//-----------------------------------------------------------------------------
00072	// For dynamic load referencing by hand
00073	// Forces some pointers to load (JOB)
00074	var(ForcedLoading) array<texture> ForcedTextures;
00075	var(ForcedLoading) array<mesh> ForcedMeshes;
00076	var(ForcedLoading) array<staticmesh> ForcedStaticMeshes;
00077	var(ForcedLoading) array<class> ForcedClasses;
00078	
00079	var float MemFOVBeforeFlash;
00080	
00081	//_____________________________________________________________________________
00082	event ParseDynamicLoading(LevelInfo MyLI)
00083	{
00084	    local int i;
00085	    Log("ParseDynamicLoading Actor="$self);
00086	    if ( ForcedTextures.Length > 0 )
00087	      for ( i=0; i< ForcedTextures.Length; i++ )
00088	        MyLI.ForcedTextures[MyLI.ForcedTextures.Length] = ForcedTextures[i];
00089	    if ( ForcedMeshes.Length > 0 )
00090	      for ( i=0; i< ForcedMeshes.Length; i++ )
00091	        MyLI.ForcedMeshes[MyLI.ForcedMeshes.Length] = ForcedMeshes[i];
00092	    if ( ForcedStaticMeshes.Length > 0 )
00093	      for ( i=0; i< ForcedStaticMeshes.Length; i++ )
00094	        MyLI.ForcedStaticMeshes[MyLI.ForcedStaticMeshes.Length] = ForcedStaticMeshes[i];
00095	    if ( ForcedClasses.Length > 0 )
00096	      for ( i=0; i< ForcedClasses.Length; i++ )
00097	      {
00098	        MyLI.ForcedClasses[MyLI.ForcedClasses.Length] = ForcedClasses[i];
00099	        if ( class<Inventory>(ForcedClasses[i]) != none )
00100	    			class<Inventory>(ForcedClasses[i]).Static.StaticParseDynamicLoading(MyLI);
00101	      }
00102	    if ( InitialInv.Length > 0 )
00103	      for ( i=0; i< InitialInv.Length; i++ )
00104	      {
00105	        if ( InitialInv[i] != none )
00106	        {
00107	          MyLI.ForcedClasses[MyLI.ForcedClasses.Length] = InitialInv[i];
00108	    			InitialInv[i].Static.StaticParseDynamicLoading(MyLI);
00109	    		}
00110	      }
00111	}
00112	
00113	//_____________________________________________________________________________
00114	function PostBeginPlay()
00115	{
00116	    local int i;
00117	
00118	    for (i = 0; i < Objectif.Length; i++)
00119	    {
00120	      if ( Objectif[i].bAntiGoal )
00121	        Objectif[i].bCompleted = true;
00122	      else
00123	        Objectif[i].bCompleted = false;
00124	    }
00125	
00126	    // start the script
00127	    SetTimer(checkTime, false);
00128	    bLevelComplete = false;
00129	
00130	    // MLK: Better here for compatibility, FirstFrame() is executed too late
00131	    XIIIGameInfo(Level.Game).MapInfo = self;
00132	}
00133	
00134	//_____________________________________________________________________________
00135	function Timer()
00136	{
00137	    if ( bFirstTime )
00138	      FirstFrame();
00139	    if (!bLevelComplete)
00140	      TestGoalComplete();
00141	}
00142	
00143	//_____________________________________________________________________________
00144	function FirstFrame()
00145	{
00146	    local int i;
00147	
00148	//    for (i=0; i<MessageGameOver.Length; i++)
00149	//      Log("#### MessageGameOver["$i$"]="$MessageGameOver[i]);
00150	
00151	    XIIIGameInfo(Level.Game).MapInfo=self;
00152	    XIIIController=FindPlayerController();
00153	    XIIIPawn=XIIIPawn(XIIIController.Pawn);
00154	    SetupInitialInventory(XIIIPawn);
00155	    bFirstTime=false;
00156	    for (i=0; i<Objectif.Length; i++)
00157	    {
00158	      if ( Objectif[i].bPrimary && (!Objectif[i].bCompleted || Objectif[i].bAntiGoal) )
00159	        DisplayGoal(i, false);
00160	    }
00161	
00162	    if ( Level.Game.GoreLevel != 0 )
00163	    {
00164	// PARENTAL LOCL ON
00165			ReplaceATextureByAnOther( Texture'XIIICine.effets.blodspotA', Texture'XIIICine.effets.blodspotAPL' );
00166			ReplaceATextureByAnOther( Texture'XIIICine.effets.bloodheadshotA', Texture'XIIICine.effets.bloodheadshotAPL' );
00167			ReplaceATextureByAnOther( Texture'XIIICine.effets.bloodprojM', Texture'XIIICine.effets.bloodprojMPL' );
00168			ReplaceATextureByAnOther( Texture'XIIICine.effets.goutteblood', Texture'XIIICine.effets.gouttebloodPL' );
00169			ReplaceATextureByAnOther( Texture'XIIICine.effets.jikleblood', Texture'XIIICine.effets.jiklebloodPL' );
00170			ReplaceATextureByAnOther( Texture'XIIICine.effets.projectionblodA', Texture'XIIICine.effets.projectionblodAPL' );
00171			ReplaceATextureByAnOther( Texture'XIIICine.effets.vignetteblood', Texture'XIIICine.effets.vignettebloodPL' );
00172		}
00173		else
00174		{
00175	// PARENTAL LOCL OFF
00176			ReplaceATextureByAnOther( Texture'XIIICine.effets.blodspotAPL', Texture'XIIICine.effets.blodspotA' );
00177			ReplaceATextureByAnOther( Texture'XIIICine.effets.bloodheadshotAPL', Texture'XIIICine.effets.bloodheadshotA' );
00178			ReplaceATextureByAnOther( Texture'XIIICine.effets.bloodprojMPL', Texture'XIIICine.effets.bloodprojM' );
00179			ReplaceATextureByAnOther( Texture'XIIICine.effets.gouttebloodPL', Texture'XIIICine.effets.goutteblood' );
00180			ReplaceATextureByAnOther( Texture'XIIICine.effets.jiklebloodPL', Texture'XIIICine.effets.jikleblood' );
00181			ReplaceATextureByAnOther( Texture'XIIICine.effets.projectionblodAPL', Texture'XIIICine.effets.projectionblodA' );
00182			ReplaceATextureByAnOther( Texture'XIIICine.effets.vignettebloodPL', Texture'XIIICine.effets.vignetteblood' );
00183		}
00184	
00185	    TriggerEvent('MapStart',self,none);
00186	}
00187	
00188	//_____________________________________________________________________________
00189	function XIIIPlayerController FindPlayerController()
00190	{
00191	    local Controller C;
00192	    for( C=Level.ControllerList; C!=None; C=C.nextController )
00193	        if( C.IsA('XIIIPlayerController') )
00194	        {
00195	            return XIIIPlayerController(C);
00196	        }
00197	    return none;
00198	}
00199	
00200	//_____________________________________________________________________________
00201	function Inventory GiveSomething(class<Inventory> ItemClass, XIIIPawn P)
00202	{
00203	  local Inventory NewItem;
00204	
00205	  if( P.FindInventoryType(ItemClass)==None )
00206	  {
00207	    NewItem = Spawn(ItemClass,,,P.Location);
00208	    if( NewItem != None )
00209	      NewItem.GiveTo(P);
00210	  }
00211	  else
00212	  {
00213	    NewItem = P.FindInventoryType(ItemClass);
00214	    if ( Ammunition(NewItem) != none )
00215	      Ammunition(NewItem).AddAmmo(Class<Ammunition>(ItemClass).default.AmmoAmount);
00216	//      Ammunition(NewItem).AmmoAmount += Class<Ammunition>(ItemClass).default.AmmoAmount;
00217	  }
00218	  return NewItem;
00219	}
00220	
00221	//_____________________________________________________________________________
00222	function SetUpInitialInventory(XIIIPawn P)
00223	{
00224	    local int i;
00225	
00226	    if ( P.IsPlayerPawn() )
00227	      Log("### SetUpInitialInventory for "$P);
00228	    for (i=0; i<InitialInv.Length; i++)
00229	    {
00230	      GiveSomething(InitialInv[i], P);
00231	    }
00232	    if ( P.IsPlayerPawn() )
00233	      Log("### END SetUpInitialInventory");
00234	}
00235	
00236	//_____________________________________________________________________________
00237	// Save the player's inventory to give him whatever we want in a flashback
00238	function bool SaveInventoryForFlash(XIIIPawn P)
00239	{
00240	//    local FakeXIIIPawn FP;
00241	    local XIIIPawn FP;
00242	    local weapon W;
00243	    local XIIIItems XI;
00244	
00245	    if ( FakePawn != none )
00246	      return true;
00247	
00248	    // We do create the fake pawn that will hold the player's inventory
00249	//    FP=Spawn(class'FakeXIIIPawn',,,P.Location);
00250	    XIIIPawn.SetCollision(true, false, false);
00251	    XIIIPawn.SetDrawType(DT_None);
00252	    XIIIPawn.bIsInCine = true;
00253	    class'XIIIPlayerPawn'.default.bCollideWorld = false;
00254	//    class'XIIIPlayerPawn'.default.bCollideWhenPlacing = false;
00255	    FP = Spawn(class'XIIIPlayerPawn',,,P.Location);
00256	//    class'XIIIPlayerPawn'.default.bCollideWhenPlacing = true;
00257	    class'XIIIPlayerPawn'.default.bCollideWorld = true;
00258	    if ( FP != none )
00259	    {
00260	      Level.Game.AddDefaultInventory(FP);
00261	      FP.SetRotation(XIIIPawn.Rotation);
00262	      FakePawn = FP;
00263	      XIIIWeapon(XIIIPawn.Weapon).UnFire(0); // ELR Make weapon react like if release fire (to disable grenad pb)
00264	      XIIIController.UnPossess();
00265	      XIIIController.Possess(FP);
00266	      XIIIController.SetViewTarget(FP);
00267	      MemFOVBeforeFlash = XIIIController.FOVAngle;
00268	      XIIIController.FOVAngle = XIIIController.DefaultFOV;
00269	      XIIIController.DesiredFOV = XIIIController.DefaultFOV;
00270	
00271	//    [FRD] inscription a la basesoldierlist
00272	  		level.game.BaseSoldierList.Length = level.game.BaseSoldierList.Length + 1;
00273	      level.game.BaseSoldierList[level.game.BaseSoldierList.Length - 1] = FP;
00274	
00275	      FP.SetRotation(XIIIPawn.Rotation);
00276	      if ( XIIIPawn.bIsCrouched )
00277	      {
00278	        FP.ShouldCrouch(true);
00279	        FP.StartCrouch(FP.CollisionHeight - FP.CrouchHeight);
00280	        FP.EyeHeight = FP.BaseEyeHeight;
00281	      }
00282	      FP.bCollideWorld = true;
00283	      FP.EyeHeight = FP.BaseEyeHeight;
00284	      FP.SetCollision(true,true,true);
00285	      Log("### Saving inventory before flash FakePawn="$FakePawn@"XIIIPawn="$XIIIPawn);
00286	      return true;
00287	    }
00288	    // If unable to spawn playerpawn then
00289	    Log("### BIG BUG ### COULD NOT SAVE INVENTORY BEFORE FLASH !!!");
00290	    return false;
00291	}
00292	
00293	//_____________________________________________________________________________
00294	// Restore the player's inventory after a flashback
00295	function bool RestoreInventoryAfterFlash(XIIIPawn P)
00296	{
00297		local int i;
00298	    Log("### Restoring inventory before flash FakePawn="$FakePawn@"XIIIPawn="$XIIIPawn);
00299	    if (FakePawn != none)
00300	    {
00301			//    [FRD] suppression de la basesoldierlist
00302			for (i = 0; i <level.game.BaseSoldierList.Length; i++)
00303			{
00304				if (level.game.BaseSoldierList[i] == FakePawn )
00305				{
00306					level.game.BaseSoldierList.Remove(i,1);
00307					break;
00308				}
00309			}
00310			//
00311	      XIIIController.UnPossess();
00312	      XIIIController.Possess(XIIIPawn);
00313	      XIIIController.SetViewTarget(XIIIPawn);
00314	      XIIIController.FOVAngle = MemFOVBeforeFlash;
00315	      XIIIController.DesiredFOV = MemFOVBeforeFlash;
00316	
00317	      XIIIPawn.SetCollision(true, True, true);
00318	      XIIIPawn.SetDrawType(DT_Mesh);
00319	      XIIIPawn.bIsInCine = false;
00320	      if ( XIIIPawn.bIsCrouched )
00321	      {
00322	        XIIIPawn.ShouldCrouch(true);
00323	        XIIIPawn.StartCrouch(XIIIPawn.CollisionHeight - XIIIPawn.CrouchHeight);
00324	        XIIIPawn.EyeHeight = XIIIPawn.BaseEyeHeight;
00325	      }
00326	      Log("   Restoring Weapon/Item Status WeaponMode ?"@XIIIController.bWeaponMode);
00327	      if ( XIIIController.bWeaponMode )
00328	      {
00329	        Log("   WeaponMode, Weapon="$XIIIPawn.Weapon);
00330	        if ( XIIIPawn.Weapon.HasAmmo() )
00331	          XIIIPawn.Weapon.GotoState('Idle');
00332	        else
00333	        {
00334	          XIIIController.NextWeapon();
00335	          XIIIPawn.Weapon.gotoState('DownWeapon');
00336	        }
00337	      }
00338	      else
00339	      {
00340	        Log("   ItemMode, Item="$XIIIPawn.SelectedItem);
00341	        if ( XIIIPawn.SelectedItem != none )
00342	          XIIIPawn.SelectedItem.GotoState('Idle');
00343	        else
00344	        {
00345	          XIIIController.NextWeapon();
00346	          XIIIPawn.ChangedWeapon();
00347	        }
00348	      }
00349	      FakePawn.Destroy();
00350	      FakePawn = none;
00351	      return true;
00352	    }
00353	    return false;
00354	}
00355	
00356	//_____________________________________________________________________________
00357	function PostRender(canvas C);
00358	
00359	//_____________________________________________________________________________
00360	function SetGoalComplete(int N)
00361	{
00362	    local string S;
00363	    local string sGameOver;
00364	
00365	    if (DBObjectives) Log("SetGoalComplete "$N);
00366	
00367	    if ( Level.Game.bGameEnded )
00368	      return;
00369	
00370	    if ( N >= Objectif.Length )
00371	      return;
00372	
00373	    if ( Objectif[N].bAntiGoal && Objectif[N].bPrimary )
00374	    {
00375	      // too bad, game over.
00376	      Objectif[N].bCompleted = false;
00377	      sGameOver = sIncompleteGoal$MessageGameOver[N];
00378	      Level.Game.EndGame( XIIIController.PlayerReplicationInfo, sGameOver );
00379	      return;
00380	    }
00381	
00382	    Objectif[N].bCompleted = true;
00383	
00384	    XIIIController.MyHUD.LocalizedMessage( class'XIIIGoalMessage', 1, XIIIController.PlayerReplicationInfo, none, self, Objectif[N].GoalText );
00385	    TestGoalComplete();
00386	    if ( bLevelComplete )
00387	      DoTravel();
00388	}
00389	
00390	//_____________________________________________________________________________
00391	FUNCTION DoTravel()
00392	{
00393	    LOCAL Inventory inv, inv2;
00394	    LOCAL int i;
00395	
00396	    Level.Game.EndGame( XIIIController.PlayerReplicationInfo, "GoalComplete" );
00397	
00398	    Inv = XIIIPawn.Inventory;
00399	    while ( Inv!=none )
00400	    {
00401	      Inv2 = Inv.Inventory; // Memorize next inventory
00402	      if ( ( Inv.IsA('Keys') && !Inv.IsA('LockPick') ) || Inv.IsA('MagneticCard') )
00403	        Inv.Destroy();
00404	      if ( inv.IsA('Weapon') && (Weapon(inv).WHand == WHA_Deco) )
00405	      {
00406	        if ( XIIIPawn.Weapon == inv )
00407	          XIIIPawn.Weapon = none;
00408	        inv.Destroy();
00409	      }
00410	      Inv=Inv2;
00411	    }
00412	
00413	    for ( i=0; i<InventoryToDestroyBeforeNextMap.Length;i++)
00414	    {
00415	      while( true )
00416	      {
00417	        inv = XIIIPawn.FindInventoryKind( InventoryToDestroyBeforeNextMap[i] );
00418	        if (inv == none)
00419	          break;
00420	        inv.Destroy();
00421	      }
00422	    }
00423	}
00424	
00425	//_____________________________________________________________________________
00426	// Goal Become primary
00427	function SetPrimaryGoal(int N)
00428	{
00429	    if (DBObjectives) Log("SetPrimaryGoal "$N);
00430	    if ( !Objectif[N].bPrimary )
00431	    {
00432	      Objectif[N].bPrimary = true;
00433	      DisplayGoal(N, true);
00434	    }
00435	}
00436	
00437	//_____________________________________________________________________________
00438	// Goal is not primary anymore
00439	function SetSecondaryGoal(int N)
00440	{
00441	    if (DBObjectives) Log("SetSecondaryGoal "$N);
00442	    if ( Objectif[N].bPrimary )
00443	    {
00444	      Objectif[N].bPrimary = false;
00445	    }
00446	}
00447	
00448	//_____________________________________________________________________________
00449	// Send goal to display
00450	function DisplayGoal(int N, optional bool bDelay)
00451	{
00452	    if (DBObjectives) Log("Display Goal "$N$" delay="$bDelay);
00453	//    XIIIController.ClientMessage( Objectif[N].GoalText, 'GoalType');
00454	    if ( Objectif[N].bAntiGoal )
00455	    {
00456	      if (Objectif[N].GoalText != "")
00457	      {
00458	        if ( bDelay )
00459	            XIIIController.MyHUD.LocalizedMessage( class'XIIIGoalMessage', 10, XIIIController.PlayerReplicationInfo, none, self, Objectif[N].GoalText );
00460	          else
00461	            XIIIController.MyHUD.LocalizedMessage( class'XIIIGoalMessage', 2, XIIIController.PlayerReplicationInfo, none, self, Objectif[N].GoalText );
00462	      }
00463	    }
00464	    else if ( bDelay )
00465	      XIIIController.MyHUD.LocalizedMessage( class'XIIIGoalMessage', 8, XIIIController.PlayerReplicationInfo, none, self, Objectif[N].GoalText );
00466	    else
00467	      XIIIController.MyHUD.LocalizedMessage( class'XIIIGoalMessage', 0, XIIIController.PlayerReplicationInfo, none, self, Objectif[N].GoalText );
00468	}
00469	
00470	//_____________________________________________________________________________
00471	function TestGoalComplete()
00472	{
00473	    local int t, MissionEnd;
00474	
00475	    if (DBObjectives) log("Testing goal");
00476	    if (Objectif.Length > 0)
00477	    {
00478	      MissionEnd = 0;
00479	      for (t = 0; t < Objectif.Length; t++)
00480	      {
00481	        if (Objectif[t].bCompleted) MissionEnd++;
00482	      }
00483	
00484	//      log("Objectives="$Objectif.Length$" MissionEnd="$MissionEnd);
00485	      if (MissionEnd == Objectif.Length)
00486	      {
00487	        bLevelComplete = true;
00488	      }
00489	    }
00490	    for (t = 0; t < Objectif.Length; t++)
00491	      if (DBObjectives) log("  > Objective "$t$" Primary ? "$Objectif[t].bPrimary$" complete ?"$Objectif[t].bCompleted$" bAntiGoal ?"$Objectif[t].bAntiGoal);
00492	}
00493	
00494	//_____________________________________________________________________________
00495	function CloseDoor(XIIIMover P, bool bLock)
00496	{
00497	    if ( !P.bClosed )
00498	      P.PlayerTrigger(self, XIIIPawn);
00499	    if ( bLock )
00500	      p.BloqueePourLeJoueur = Les2Sens;
00501	}
00502	
00503	//_____________________________________________________________________________
00504	// tell self that a pawn has been generated (to be taken into account if necessary)
00505	function GeneratedPawn(Actor Generator, Pawn Other);
00506	
00507	
00508	
00509	
00510	defaultproperties
00511	{
00512	     DBObjectives=True
00513	     NextMapKeepInventory=True
00514	     bFirstTime=True
00515	     MaxTraceDistance=250
00516	     ShadowIntensity=196
00517	     ShadowMaxDist=1500.000000
00518	     ShadowTransDist=1000.000000
00519	     checkTime=0.100000
00520	     MessageMissionSuccess="Level Completed"
00521	     sIncompleteGoal="GoalIncomplete:"
00522	     Texture=Texture'XIII.MapInfo_ico'
00523	}

End Source Code