Overview | Package | Class | Source | Class tree | Glossary | Deus Ex UnrealScript Documentation |
previous class next class | frames no frames |
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 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 00189 00190 00191 00192 00193 00194 00195 00196 00197 00198 00199 00200 00201 00202 00203 00204 00205 00206 00207 00208 00209 00210 00211 00212 00213 00214 00215 00216 00217 00218 00219 00220 00221 00222 00223 00224 00225 00226 00227 00228 00229 00230 00231 00232 00233 00234 00235 00236 00237 00238 00239 00240 00241 00242 00243 |
//============================================================================= // Mission05. //============================================================================= class Mission05 extends MissionScript; // ---------------------------------------------------------------------- // FirstFrame() // // Stuff to check at first frame // ---------------------------------------------------------------------- function FirstFrame() { local PaulDentonCarcass carc; local PaulDenton Paul; local Terrorist T; local Inventory item, nextItem; local SpawnPoint SP; local AnnaNavarre Anna; Super.FirstFrame(); if (localURL == "05_NYC_UNATCOMJ12LAB") { // make sure this goal is completed Player.GoalCompleted('EscapeToBatteryPark'); // delete Paul's carcass if he's still alive if (!flags.GetBool('PaulDenton_Dead')) { foreach AllActors(class'PaulDentonCarcass', carc) carc.Destroy(); } // if the player has already talked to Paul, delete him if (flags.GetBool('M05PaulDentonDone') || flags.GetBool('PlayerBailedOutWindow')) { foreach AllActors(class'PaulDenton', Paul) Paul.Destroy(); } // if Miguel is not following the player, delete him if (flags.GetBool('MeetMiguel_Played') && !flags.GetBool('MiguelFollowing')) { foreach AllActors(class'Terrorist', T) if (T.BindName == "Miguel") T.Destroy(); } // remove the player's inventory and put it in a room // also, heal the player up to 50% of his total health if (!flags.GetBool('MS_InventoryRemoved')) { Player.HealthHead = Max(50, Player.HealthHead); Player.HealthTorso = Max(50, Player.HealthTorso); Player.HealthLegLeft = Max(50, Player.HealthLegLeft); Player.HealthLegRight = Max(50, Player.HealthLegRight); Player.HealthArmLeft = Max(50, Player.HealthArmLeft); Player.HealthArmRight = Max(50, Player.HealthArmRight); Player.GenerateTotalHealth(); if (Player.Inventory != None) { item = Player.Inventory; nextItem = None; foreach AllActors(class'SpawnPoint', SP, 'player_inv') { // Find the next item we can process. while((item != None) && (item.IsA('NanoKeyRing') || (!item.bDisplayableInv))) item = item.Inventory; if (item != None) { nextItem = item.Inventory; Player.DeleteInventory(item); item.DropFrom(SP.Location); // restore any ammo amounts for a weapon to default if (item.IsA('Weapon') && (Weapon(item).AmmoType != None)) Weapon(item).PickupAmmoCount = Weapon(item).Default.PickupAmmoCount; } if (nextItem == None) break; else item = nextItem; } } flags.SetBool('MS_InventoryRemoved', True,, 6); } } else if (localURL == "05_NYC_UNATCOHQ") { // if Miguel is following the player, unhide him if (flags.GetBool('MiguelFollowing')) { foreach AllActors(class'Terrorist', T) if (T.BindName == "Miguel") T.EnterWorld(); } // make Anna not flee in this mission foreach AllActors(class'AnnaNavarre', Anna) Anna.MinHealth = 0; } else if (localURL == "05_NYC_UNATCOISLAND") { // if Miguel is following the player, unhide him if (flags.GetBool('MiguelFollowing')) { foreach AllActors(class'Terrorist', T) if (T.BindName == "Miguel") T.EnterWorld(); } } } // ---------------------------------------------------------------------- // PreTravel() // // Set flags upon exit of a certain map // ---------------------------------------------------------------------- function PreTravel() { Super.PreTravel(); } // ---------------------------------------------------------------------- // Timer() // // Main state machine for the mission // ---------------------------------------------------------------------- function Timer() { local AnnaNavarre Anna; local WaltonSimons Walton; local DeusExMover M; Super.Timer(); if (localURL == "05_NYC_UNATCOHQ") { // unlock a door if (flags.GetBool('CarterUnlock') && !flags.GetBool('MS_DoorUnlocked')) { foreach AllActors(class'DeusExMover', M, 'supplydoor') { M.bLocked = False; M.lockStrength = 0.0; } flags.SetBool('MS_DoorUnlocked', True,, 6); } // kill Anna when a flag is set if (flags.GetBool('annadies') && !flags.GetBool('MS_AnnaKilled')) { foreach AllActors(class'AnnaNavarre', Anna) { Anna.HealthTorso = 0; Anna.Health = 0; Anna.TakeDamage(1, Anna, Anna.Location, vect(0,0,0), 'Shot'); } flags.SetBool('MS_AnnaKilled', True,, 6); } // make Anna attack the player after a convo is played if (flags.GetBool('M05AnnaAtExit_Played') && !flags.GetBool('MS_AnnaAttacking')) { foreach AllActors(class'AnnaNavarre', Anna) Anna.SetOrders('Attacking', '', True); flags.SetBool('MS_AnnaAttacking', True,, 6); } // unhide Walton Simons if (flags.GetBool('simonsappears') && !flags.GetBool('MS_SimonsUnhidden')) { foreach AllActors(class'WaltonSimons', Walton) Walton.EnterWorld(); flags.SetBool('MS_SimonsUnhidden', True,, 6); } // hide Walton Simons if ((flags.GetBool('M05MeetManderley_Played') || flags.GetBool('M05SimonsAlone_Played')) && !flags.GetBool('MS_SimonsHidden')) { foreach AllActors(class'WaltonSimons', Walton) Walton.LeaveWorld(); flags.SetBool('MS_SimonsHidden', True,, 6); } // mark a goal as completed if (flags.GetBool('KnowsAnnasKillphrase1') && flags.GetBool('KnowsAnnasKillphrase2') && !flags.GetBool('MS_KillphraseGoalCleared')) { Player.GoalCompleted('FindAnnasKillphrase'); flags.SetBool('MS_KillphraseGoalCleared', True,, 6); } // clear a goal when anna is out of commision if (flags.GetBool('AnnaNavarre_Dead') && !flags.GetBool('MS_EliminateAnna')) { Player.GoalCompleted('EliminateAnna'); flags.SetBool('MS_EliminateAnna', True,, 6); } } else if (localURL == "05_NYC_UNATCOMJ12LAB") { // After the player talks to Paul, start a datalink if (!flags.GetBool('MS_DL_Played') && flags.GetBool('PaulInMedLab_Played')) { Player.StartDataLinkTransmission("DL_Paul"); flags.SetBool('MS_DL_Played', True,, 6); } } } // ---------------------------------------------------------------------- // ---------------------------------------------------------------------- defaultproperties { } |
Overview | Package | Class | Source | Class tree | Glossary | Deus Ex UnrealScript Documentation |
previous class next class | frames no frames |