Core.Object | +--Engine.Actor | +--Engine.Info | +--UTMenu.NewGameInterimObject
string
GameWindowType
void
PostBeginPlay()
00001 class NewGameInterimObject expands Info; 00002 00003 var string GameWindowType; 00004 00005 function PostBeginPlay() 00006 { 00007 local LadderInventory LadderObj; 00008 local int EmptySlot, j; 00009 00010 EmptySlot = -1; 00011 for (j=0; j<5; j++) 00012 { 00013 if (class'SlotWindow'.Default.Saves[j] == "") { 00014 EmptySlot = j; 00015 break; 00016 } 00017 } 00018 00019 if (EmptySlot < 0) 00020 { 00021 // Create "You must first free a slot..." dialog. 00022 TournamentConsole(PlayerPawn(Owner).Player.Console).Root.CreateWindow(class'FreeSlotsWindow', 100, 100, 200, 200); 00023 return; 00024 } 00025 00026 // Create new game dialog. 00027 TournamentConsole(PlayerPawn(Owner).Player.Console).bNoDrawWorld = True; 00028 TournamentConsole(PlayerPawn(Owner).Player.Console).bLocked = True; 00029 UMenuRootWindow(TournamentConsole(PlayerPawn(Owner).Player.Console).Root).MenuBar.HideWindow(); 00030 00031 // Make them a ladder object. 00032 LadderObj = LadderInventory(PlayerPawn(Owner).FindInventoryType(class'LadderInventory')); 00033 if (LadderObj == None) 00034 { 00035 // Make them a ladder object. 00036 LadderObj = Spawn(class'LadderInventory'); 00037 Log("Created a new LadderInventory."); 00038 LadderObj.GiveTo(PlayerPawn(Owner)); 00039 } 00040 LadderObj.Reset(); 00041 LadderObj.Slot = EmptySlot; // Find a free slot. 00042 class'ManagerWindow'.Default.DOMDoorOpen[EmptySlot] = 0; 00043 class'ManagerWindow'.Default.CTFDoorOpen[EmptySlot] = 0; 00044 class'ManagerWindow'.Default.ASDoorOpen[EmptySlot] = 0; 00045 class'ManagerWindow'.Default.ChalDoorOpen[EmptySlot] = 0; 00046 class'ManagerWindow'.Static.StaticSaveConfig(); 00047 Log("Assigned player a LadderInventory."); 00048 00049 // Clear all slots. 00050 Owner.PlaySound(sound'LadderSounds.ladvance', SLOT_None, 0.1); 00051 Owner.PlaySound(sound'LadderSounds.ladvance', SLOT_Misc, 0.1); 00052 Owner.PlaySound(sound'LadderSounds.ladvance', SLOT_Pain, 0.1); 00053 Owner.PlaySound(sound'LadderSounds.ladvance', SLOT_Interact, 0.1); 00054 Owner.PlaySound(sound'LadderSounds.ladvance', SLOT_Talk, 0.1); 00055 Owner.PlaySound(sound'LadderSounds.ladvance', SLOT_Interface, 0.1); 00056 00057 // Go to the character creation screen. 00058 TournamentConsole(PlayerPawn(Owner).Player.Console).Root.CreateWindow(Class<UWindowWindow>(DynamicLoadObject(GameWindowType, Class'Class')), 100, 100, 200, 200, TournamentConsole(PlayerPawn(Owner).Player.Console).Root, True); 00059 } 00060 00061 defaultproperties 00062 { 00063 GameWindowType="UTMenu.NewCharacterWindow" 00064 }