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 |
//============================================================================= // Mission01. //============================================================================= class Mission01 expands MissionScript; // ---------------------------------------------------------------------- // FirstFrame() // // Stuff to check at first frame // ---------------------------------------------------------------------- function FirstFrame() { local PaulDenton Paul; local UNATCOTroop troop; local TerroristCommander cmdr; Super.FirstFrame(); if (localURL == "01_NYC_UNATCOISLAND") { // delete Paul and company after final briefing if (flags.GetBool('M02Briefing_Played')) { foreach AllActors(class'PaulDenton', Paul) Paul.Destroy(); foreach AllActors(class'UNATCOTroop', troop, 'custodytroop') troop.Destroy(); foreach AllActors(class'TerroristCommander', cmdr, 'TerroristCommander') cmdr.Destroy(); } } } // ---------------------------------------------------------------------- // PreTravel() // // Set flags upon exit of a certain map // ---------------------------------------------------------------------- function PreTravel() { Super.PreTravel(); } // ---------------------------------------------------------------------- // Timer() // // Main state machine for the mission // ---------------------------------------------------------------------- function Timer() { local Terrorist T; local TerroristCarcass carc; local ScriptedPawn P; local SpawnPoint SP; local DeusExMover M; local PaulDenton Paul; local AutoTurret turret; local LaserTrigger laser; local SecurityCamera cam; local int count; local Inventory item, nextItem; Super.Timer(); if (localURL == "01_NYC_UNATCOISLAND") { // count the number of dead terrorists if (!flags.GetBool('M01PlayerAggressive')) { count = 0; // count the living foreach AllActors(class'Terrorist', T) count++; // add the unconscious ones to the not dead count // there are 28 terrorists total on the island foreach AllActors(class'TerroristCarcass', carc) { if ((carc.KillerBindName == "JCDenton") && (carc.itemName == "Unconscious")) count++; else if (carc.KillerBindName != "JCDenton") count++; } // if the player killed more than 5, set the flag if (count < 23) flags.SetBool('M01PlayerAggressive', True,, 6); // don't expire until mission 6 } // check for the leader being killed if (!flags.GetBool('MS_DL_Played')) { if (flags.GetBool('TerroristCommander_Dead')) { if (!flags.GetBool('DL_LeaderNotKilled_Played')) Player.StartDataLinkTransmission("DL_LeaderKilled"); else Player.StartDataLinkTransmission("DL_LeaderKilledInSpite"); flags.SetBool('MS_DL_Played', True,, 2); } } // check for player not killing leader if (!flags.GetBool('PlayerAttackedStatueTerrorist') && flags.GetBool('MeetTerrorist_Played') && !flags.GetBool('MS_DL2_Played')) { Player.StartDataLinkTransmission("DL_LeaderNotKilled"); flags.SetBool('MS_DL2_Played', True,, 2); } // remove guys and move Paul if (!flags.GetBool('MS_MissionComplete')) { if (flags.GetBool('StatueMissionComplete')) { // open the HQ blast doors and unlock some other doors foreach AllActors(class'DeusExMover', M) { if (M.Tag == 'UN_maindoor') { M.bLocked = False; M.lockStrength = 0.0; M.Trigger(None, None); } else if ((M.Tag == 'StatueRuinDoors') || (M.Tag == 'temp_celldoor')) { M.bLocked = False; M.lockStrength = 0.0; } } // unhide the troop, delete the terrorists, Gunther, and teleport Paul foreach AllActors(class'ScriptedPawn', P) { if (P.IsA('UNATCOTroop') && (P.BindName == "custodytroop")) P.EnterWorld(); else if (P.IsA('UNATCOTroop') && (P.BindName == "postmissiontroops")) P.EnterWorld(); else if (P.IsA('ThugMale2') || P.IsA('SecurityBot3')) P.Destroy(); else if (P.IsA('Terrorist') && (P.BindName != "TerroristCommander")) { // actually kill the terrorists instead of destroying them P.HealthTorso = 0; P.Health = 0; P.TakeDamage(1, P, P.Location, vect(0,0,0), 'Shot'); // delete their inventories as well if (P.Inventory != None) { do { item = P.Inventory; nextItem = item.Inventory; P.DeleteInventory(item); item.Destroy(); item = nextItem; } until (item == None); } } else if (P.BindName == "GuntherHermann") P.Destroy(); else if (P.BindName == "PaulDenton") { SP = GetSpawnPoint('PaulTeleport'); if (SP != None) { P.SetLocation(SP.Location); P.SetRotation(SP.Rotation); P.SetOrders('Standing',, True); P.SetHomeBase(SP.Location, SP.Rotation); } } } // delete all tagged turrets foreach AllActors(class'AutoTurret', turret) if ((turret.Tag == 'NSFTurret01') || (turret.Tag == 'NSFTurret02')) turret.Destroy(); // delete all tagged lasertriggers foreach AllActors(class'LaserTrigger', laser, 'statue_lasertrap') laser.Destroy(); // turn off all tagged cameras foreach AllActors(class'SecurityCamera', cam) if ((cam.Tag == 'NSFCam01') || (cam.Tag == 'NSFCam02') || (cam.Tag == 'NSFCam03')) cam.bNoAlarm = True; flags.SetBool('MS_MissionComplete', True,, 2); } } } else if (localURL == "01_NYC_UNATCOHQ") { // unhide Paul if (!flags.GetBool('MS_ReadyForBriefing')) { if (flags.GetBool('M01ReadyForBriefing')) { foreach AllActors(class'PaulDenton', Paul) Paul.EnterWorld(); flags.SetBool('MS_ReadyForBriefing', True,, 2); } } } } // ---------------------------------------------------------------------- // ---------------------------------------------------------------------- defaultproperties { } |
Overview | Package | Class | Source | Class tree | Glossary | Deus Ex UnrealScript Documentation |
previous class next class | frames no frames |