void AIScriptSadik::Retired(int byActorId) { if ((Actor_Query_Goal_Number(kActorSadik) == 418 || Actor_Query_Goal_Number(kActorSadik) == 450 ) && Actor_Query_Which_Set_In(kActorSadik) != kSetKP07 ) { Scene_Exits_Enable(); } if (Actor_Query_In_Set(kActorSadik, kSetKP07)) { Global_Variable_Decrement(kVariableReplicants, 1); Actor_Set_Goal_Number(kActorSadik, 599); if (Global_Variable_Query(kVariableReplicants) == 0) { Player_Loses_Control(); Delay(2000); Player_Set_Combat_Mode(false); Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, true, false, 0); Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(579); Game_Flag_Reset(653); Set_Enter(kSetKP05_KP06, kSceneKP06); return; //true; } } Actor_Set_Goal_Number(kActorSadik, 599); return; //false; }
bool AIScriptMutant1::Update() { if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorMutant1) != 590) { if (Actor_Query_Which_Set_In(kActorMutant1) != Player_Query_Current_Set()) { Actor_Set_Goal_Number(kActorMutant1, 590); } return false; } if (Global_Variable_Query(kVariableChapter) != 4) { return false; } switch (Actor_Query_Goal_Number(kActorMutant1)) { case 400: if (!Game_Flag_Query(523) && Game_Flag_Query(524) == 1) { Actor_Set_Goal_Number(kActorMutant1, 401); Actor_Set_Goal_Number(kActorMutant2, 401); Actor_Set_Goal_Number(kActorMutant3, 401); Actor_Set_Targetable(kActorMutant1, 1); Actor_Set_Targetable(kActorMutant2, 1); Actor_Set_Targetable(kActorMutant3, 1); Game_Flag_Set(523); } break; case 401: if (Actor_Query_Which_Set_In(kActorMutant1) == Player_Query_Current_Set() && (Actor_Query_Friendliness_To_Other(kActorMutant1, kActorMcCoy) < 30 || Actor_Query_Combat_Aggressiveness(70) >= 60)) { Actor_Set_Goal_Number(kActorMutant1, 410); } break; case 404: if (!Game_Flag_Query(630)) { Actor_Set_Goal_Number(kActorMutant1, 403); } break; case 410: if (Actor_Query_Which_Set_In(kActorMutant1) != Player_Query_Current_Set()) { Non_Player_Actor_Combat_Mode_Off(kActorMutant1); Actor_Set_Goal_Number(kActorMutant1, 403); } break; case 599: if (Actor_Query_Which_Set_In(kActorMutant1) != Player_Query_Current_Set()) { Actor_Set_Goal_Number(kActorMutant1, 411); } break; } if (Game_Flag_Query(630) == 1 && Actor_Query_Goal_Number(kActorMutant1) != 599) { Actor_Set_Goal_Number(kActorMutant1, 404); } return false; }
void AIScriptSadik::Retired(int byActorId) { if ((Actor_Query_Goal_Number(kActorSadik) == 418 || Actor_Query_Goal_Number(kActorSadik) == 450 ) && Actor_Query_Which_Set_In(kActorSadik) != kSetKP07 ) { Scene_Exits_Enable(); } if (Actor_Query_In_Set(kActorSadik, kSetKP07)) { Global_Variable_Decrement(kVariableReplicantsSurvivorsAtMoonbus, 1); // can't Sadik still be human (Rep-sympathiser here? A bug? Actor_Set_Goal_Number(kActorSadik, kGoalSadikGone); if (Global_Variable_Query(kVariableReplicantsSurvivorsAtMoonbus) == 0) { Player_Loses_Control(); Delay(2000); Player_Set_Combat_Mode(false); Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, true, false, false); Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagKP07toKP06); Game_Flag_Reset(kFlagMcCoyIsHelpingReplicants); Set_Enter(kSetKP05_KP06, kSceneKP06); return; //true; } } Actor_Set_Goal_Number(kActorSadik, kGoalSadikGone); return; //false; }
void ScriptHF01::PlayerWalkedIn() { if (Game_Flag_Query(663)) { ADQ_Flush(); ADQ_Add(24, 280, 3); Actor_Put_In_Set(23, 37); Actor_Set_At_XYZ(23, 8.2f, 8.0f, -346.67f, 1021); Actor_Put_In_Set(24, 37); Actor_Set_At_XYZ(24, 51.21f, 8.0f, -540.78f, 796); Non_Player_Actor_Combat_Mode_On(23, 3, 1, 0, 4, 4, 7, 8, 0, 0, 0, 100, 300, 0); Non_Player_Actor_Combat_Mode_On(24, 3, 1, 0, 4, 4, 7, 8, 0, 0, 0, 100, 300, 0); } if (!Game_Flag_Query(165) && Actor_Query_Goal_Number(9) != 2) { if (Actor_Clue_Query(0, 141) && Global_Variable_Query(45) == 3 && Actor_Query_Goal_Number(6) != 599) { Actor_Put_In_Set(6, 37); Actor_Set_At_XYZ(6, -5.0f, 8.0f, -622.0f, 419); Actor_Set_Targetable(6, true); } else if (Actor_Clue_Query(0, 139) && Global_Variable_Query(45) == 2 && Actor_Query_Goal_Number(3) != 599) { Actor_Put_In_Set(3, 37); Actor_Set_At_XYZ(3, -5.0f, 8.0f, -622.0f, 419); Actor_Set_Targetable(3, true); } } if (Game_Flag_Query(617)) { Actor_Set_Goal_Number(1, 280); Game_Flag_Reset(617); //return true; return; } if (Game_Flag_Query(652)) { Game_Flag_Reset(652); Actor_Voice_Over(950, 99); Actor_Voice_Over(960, 99); Actor_Voice_Over(970, 99); Actor_Voice_Over(980, 99); } else if (!Game_Flag_Query(377) && Global_Variable_Query(1) < 4) { ADQ_Flush(); ADQ_Add(31, 0, 14); ADQ_Add(31, 10, 3); ADQ_Add(22, 0, 3); Actor_Face_Actor(31, 22, true); ADQ_Add(31, 20, 13); ADQ_Add(22, 10, 3); ADQ_Add(31, 30, 3); ADQ_Add(22, 20, 3); Actor_Face_Heading(31, 271, false); Game_Flag_Set(377); } if (Game_Flag_Query(311)) { Loop_Actor_Walk_To_XYZ(0, 124.0f, 8.0f, -724.0f, 0, 1, false, 0); } else if (Game_Flag_Query(309)) { Loop_Actor_Walk_To_XYZ(0, 406.0f, 8.0f, -717.0f, 0, 1, false, 0); } else if (!Game_Flag_Query(313)) { Loop_Actor_Walk_To_XYZ(0, 100.0f, 0.0f, -300.0f, 0, 1, false, 0); } Game_Flag_Reset(311); Game_Flag_Reset(309); Game_Flag_Reset(313); //return false; }
bool AIScriptFreeSlotB::Update() { if (Global_Variable_Query(kVariableChapter) > 5) { return false; } if (Global_Variable_Query(kVariableChapter) == 4) { switch (Actor_Query_Goal_Number(kActorFreeSlotB)) { case 300: Actor_Set_Goal_Number(kActorFreeSlotB, 301); Actor_Set_Targetable(kActorFreeSlotB, 1); break; case 301: if (Actor_Query_Which_Set_In(kActorFreeSlotB) == Player_Query_Current_Set() && Actor_Query_Inch_Distance_From_Actor(kActorFreeSlotB, kActorMcCoy) <= 48) { Actor_Set_Goal_Number(kActorFreeSlotB, 302); } break; case 302: if (Actor_Query_Which_Set_In(kActorFreeSlotB) != Player_Query_Current_Set()) { Actor_Set_Goal_Number(kActorFreeSlotB, 301); } break; case 599: if (Actor_Query_Which_Set_In(kActorFreeSlotB) != Player_Query_Current_Set()) { Actor_Set_Goal_Number(kActorFreeSlotB, 300); } break; default: Actor_Set_Goal_Number(kActorFreeSlotB, 300); break; } return false; } if (Actor_Query_Goal_Number(kActorFreeSlotB) < 400) { AI_Movement_Track_Flush(kActorFreeSlotB); Actor_Set_Goal_Number(kActorFreeSlotB, 400); return true; } else { if (Actor_Query_Goal_Number(kActorFreeSlotB) != 405 || Actor_Query_Which_Set_In(kActorMcCoy) != kSetKP02) { if (Actor_Query_Goal_Number(kActorFreeSlotB) == 599) { if (Actor_Query_Which_Set_In(kActorFreeSlotB) != Player_Query_Current_Set()) { Non_Player_Actor_Combat_Mode_Off(kActorFreeSlotB); Actor_Set_Goal_Number(kActorFreeSlotB, 400); return true; } } return false; } Actor_Set_Goal_Number(kActorFreeSlotB, 406); Actor_Set_Targetable(kActorFreeSlotB, 1); return true; } }
int ScriptUG05::sub_4021B0() { if (Global_Variable_Query(45) == 2 && Actor_Query_Goal_Number(3) != 599) { return 3; } if (Global_Variable_Query(45) == 3 && Actor_Query_Goal_Number(6) != 599) { return 6; } return -1; }
int SceneScriptUG05::sub_4021B0() { if (Global_Variable_Query(45) == 2 && Actor_Query_Goal_Number(kActorDektora) != 599) { return kActorDektora; } if (Global_Variable_Query(45) == 3 && Actor_Query_Goal_Number(kActorLucy) != 599) { return kActorLucy; } return -1; }
void ScriptDR05::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (Actor_Query_Goal_Number(35) == 10 || Actor_Query_Goal_Number(35) == 18 || Actor_Query_Goal_Number(35) == 19) { Actor_Set_Goal_Number(35, 11); //return true; } //return false; }
void AIScriptGaff::CompletedMovementTrack() { if (Actor_Query_Goal_Number(kActorGaff) == kGoalGaffMA01ApproachMcCoy) { Actor_Face_Actor(kActorGaff, kActorMcCoy, true); Actor_Says(kActorGaff, 0, kAnimationModeTalk); Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorGaff, 36, false, true); Actor_Face_Actor(kActorMcCoy, kActorGaff, true); Actor_Says(kActorMcCoy, 670, kAnimationModeTalk); Actor_Says(kActorGaff, 10, kAnimationModeTalk); Actor_Says(kActorMcCoy, 675, kAnimationModeTalk); if (Game_Flag_Query(kFlagZubenRetired)) { Actor_Says(kActorGaff, 50, kAnimationModeTalk); Actor_Says(kActorMcCoy, 695, kAnimationModeTalk); Actor_Says(kActorGaff, 60, kAnimationModeTalk); Actor_Says(kActorMcCoy, 700, kAnimationModeTalk); Actor_Says(kActorGaff, 70, kAnimationModeTalk); Actor_Clue_Acquire(kActorGaff, kClueMcCoyRetiredZuben, true, -1); } else { Actor_Says(kActorGaff, 80, kAnimationModeTalk); Actor_Says(kActorGaff, 90, kAnimationModeTalk); Actor_Says(kActorMcCoy, 705, kAnimationModeTalk); Actor_Says(kActorGaff, 100, kAnimationModeTalk); Actor_Clue_Acquire(kActorGaff, kClueMcCoyLetZubenEscape, true, -1); } Actor_Says(kActorGaff, 20, kAnimationModeTalk); Actor_Says(kActorMcCoy, 680, kAnimationModeTalk); Actor_Says(kActorGaff, 30, kAnimationModeTalk); Actor_Says(kActorMcCoy, 685, kAnimationModeTalk); Actor_Says(kActorGaff, 40, kAnimationModeTalk); Actor_Says(kActorMcCoy, 690, kAnimationModeTalk); Actor_Clue_Acquire(kActorMcCoy, kClueGaffsInformation, true, kActorGaff); CDB_Set_Crime(kClueZuben, kCrimeMoonbusHijacking); Actor_Clue_Acquire(kActorGaff, kClueMcCoyRetiredZuben, true, -1); Game_Flag_Set(kFlagGaffApproachedMcCoyAboutZuben); Player_Gains_Control(); Actor_Set_Goal_Number(kActorGaff, kGoalGaffMA01Leave); } if (Actor_Query_Goal_Number(kActorGaff) == kGoalGaffCT12GoToSpinner) { Actor_Set_Goal_Number(kActorGaff, kGoalGaffCT12FlyAway); } if (Actor_Query_Goal_Number(kActorGaff) == kGoalGaffStartWalkingAround) { Actor_Set_Goal_Number(kActorGaff, kGoalGaffWalkAround); return;// true; } if (Actor_Query_Goal_Number(kActorGaff) == kGoalGaffWalkAround) { Actor_Set_Goal_Number(kActorGaff, kGoalGaffRepeatWalkingAround); return;// true; } if (Actor_Query_Goal_Number(kActorGaff) == kGoalGaffRepeatWalkingAround) { Actor_Set_Goal_Number(kActorGaff, kGoalGaffWalkAround); return;// true; } // return false; }
void SceneScriptHF04::PlayerWalkedIn() { if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyHF04Start || Actor_Query_Goal_Number(kActorLucy) == kGoalLucyHF04Run1 ) { Player_Set_Combat_Mode(true); Music_Play(kMusicBatl226M, 60, 0, 2, -1, 0, 0); } Loop_Actor_Walk_To_XYZ(kActorMcCoy, -45.0f, -0.31f, 307.0f, 0, false, true, false); Delay(2500); }
void AIScriptBryant::CompletedMovementTrack() { if (Actor_Query_Goal_Number(kActorBryant) == 101) { Actor_Set_Goal_Number(kActorBryant, 102); // return true; } else if (Actor_Query_Goal_Number(kActorBryant) == 102) { Actor_Set_Goal_Number(kActorBryant, 101); // return true; } // return false; }
void AIScriptSadik::ShotAtAndMissed() { if (Actor_Query_Goal_Number(kActorSadik) == 414 || Actor_Query_Goal_Number(kActorSadik) == kGoalSadikUG18NeedsReactorCoreFromMcCoy ) { Game_Flag_Set(kFlagMcCoyAttackedReplicants); if (Actor_Query_Which_Set_In(kActorSadik) != kSetKP07) { Actor_Set_Goal_Number(kActorSadik, 418); Scene_Exits_Disable(); } } }
void AIScriptSadik::ShotAtAndMissed() { if (Actor_Query_Goal_Number(kActorSadik) == 414 || Actor_Query_Goal_Number(kActorSadik) == 416 ) { Game_Flag_Set(714); if (Actor_Query_Which_Set_In(kActorSadik) != kSetKP07) { Actor_Set_Goal_Number(kActorSadik, 418); Scene_Exits_Disable(); } } }
void SceneScriptHF04::SceneFrameAdvanced(int frame) { if (frame == 62) { Sound_Play(kSfxSTONDOR1, Random_Query(43, 43), 0, 0, 50); } if (frame == 154) { Sound_Play(kSfxSTONDOR2, Random_Query(43, 43), 0, 0, 50); } if (frame == 179 && Actor_Query_Goal_Number(kActorLucy) == kGoalLucyHF04WaitForMcCoy1 ) { Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04Run3); } if (Game_Flag_Query(kFlagHF04CloseDoors)) { Game_Flag_Reset(kFlagHF04CloseDoors); Scene_Loop_Set_Default(kHF04LoopMainDoorsClosed); Scene_Loop_Start_Special(kSceneLoopModeOnce, kHF04LoopDoorsClosing, true); //return true; return; } if (Game_Flag_Query(kFlagHF04OpenDoors)) { Game_Flag_Reset(kFlagHF04OpenDoors); Scene_Loop_Set_Default(kHF04LoopMainLoop); Scene_Loop_Start_Special(kSceneLoopModeOnce, kHF04LoopDoorsOpening, true); return; // true; } if (frame == 89) { Game_Flag_Set(kFlagHF04DoorsClosed); Obstacle_Object("HIDE_WALL_A", false); Obstacle_Object("HIDE_WALL_B", false); Unobstacle_Object("PIVOT_WALL#1", false); Unobstacle_Object("PIVOT_WALL#02", false); Unobstacle_Object("PIVOT_WALL#03", true); return; // true; } if (frame == 180) { Unobstacle_Object("HIDE_WALL_A", false); Unobstacle_Object("HIDE_WALL_B", false); Obstacle_Object("PIVOT_WALL#1", false); Obstacle_Object("PIVOT_WALL#02", false); Obstacle_Object("PIVOT_WALL#03", true); Game_Flag_Reset(kFlagHF04DoorsClosed); if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyHF04Run2) { Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04WaitForMcCoy1); } return; // true; } //return false; }
bool AIScriptSadik::ShotAtAndHit() { #if BLADERUNNER_ORIGINAL_BUGS // Sadik killed in BB09 dead end bug fix #else if (Actor_Query_Goal_Number(kActorSadik) == kGoalSadikRunFromBB09) { // Like Izo's ShotAtAndHit() and the code below for kGoalSadikUG18Move // this will keep resetting Sadik's health to avoid killing him // Still, this is lowering Sadik's health from 80 (when Replicant) and 50 (when Human) if (Game_Flag_Query(kFlagSadikIsReplicant)) { Actor_Set_Health(kActorSadik, 60, 60); } else { Actor_Set_Health(kActorSadik, 40, 40); } return true; } #endif // BLADERUNNER_ORIGINAL_BUGS if (Actor_Query_Goal_Number(kActorSadik) == kGoalSadikUG18Move) { // this lowers Sadik's original health but makes it impossible to kill him here (UG18) if (Game_Flag_Query(kFlagSadikIsReplicant)) { #if BLADERUNNER_ORIGINAL_BUGS Actor_Set_Health(kActorSadik, 60, 60); #else // Sadik killed in BB09 dead end bug fix if (Actor_Query_Current_HP(kActorSadik) == 60) { // shot also at Bradbury, so lower his health further Actor_Set_Health(kActorSadik, 50, 50); } else { Actor_Set_Health(kActorSadik, 60, 60); } #endif } else { #if BLADERUNNER_ORIGINAL_BUGS Actor_Set_Health(kActorSadik, 40, 40); #else // Sadik killed in BB09 dead end bug fix if (Actor_Query_Current_HP(kActorSadik) == 40) { // shot also at Bradbury, so lower his health further Actor_Set_Health(kActorSadik, 30, 30); } else { Actor_Set_Health(kActorSadik, 40, 40); } #endif } return true; } if (Actor_Query_Goal_Number(kActorSadik) == 414 || Actor_Query_Goal_Number(kActorSadik) == kGoalSadikUG18NeedsReactorCoreFromMcCoy ) { Game_Flag_Set(kFlagMcCoyAttackedReplicants); if (Actor_Query_Which_Set_In(kActorSadik) != kSetKP07) { Actor_Set_Goal_Number(kActorSadik, 418); Scene_Exits_Disable(); } } return false; }
bool AIScriptLucy::Update() { float x, y, z; if (Global_Variable_Query(kVariableChapter) == 3 && Actor_Query_Goal_Number(kActorLucy) < 200) { Actor_Set_Goal_Number(kActorLucy, 200); } if (Actor_Query_Goal_Number(kActorLucy) == 230 && Player_Query_Current_Scene() == 37) { Actor_Set_Goal_Number(kActorLucy, 233); } if (Global_Variable_Query(kVariableChapter) == 4 && Actor_Query_Goal_Number(kActorLucy) < 300) { Actor_Set_Goal_Number(kActorLucy, 300); } if (Global_Variable_Query(kVariableChapter) == 4 && Actor_Query_Goal_Number(kActorLucy) == 599 && Actor_Query_Which_Set_In(kActorLucy) != 99) { if (Actor_Query_Which_Set_In(kActorLucy) != Player_Query_Current_Set()) { Actor_Put_In_Set(kActorLucy, kSetFreeSlotI); Actor_Set_At_Waypoint(kActorLucy, 41, 0); } } if (Game_Flag_Query(616) && Actor_Query_Goal_Number(kActorLucy) == 201) { Actor_Put_In_Set(kActorLucy, kSetHF03); Actor_Set_At_Waypoint(kActorLucy, 371, 156); Actor_Set_Goal_Number(kActorLucy, 250); } if (Actor_Query_Goal_Number(kActorLucy) > 229 && Actor_Query_Goal_Number(kActorLucy) < 239 && Actor_Query_Goal_Number(kActorLucy) != 232 && Player_Query_Current_Scene() == 37 && Actor_Query_Which_Set_In(kActorLucy) == 40 && !Game_Flag_Query(701) && Actor_Query_Inch_Distance_From_Actor(kActorLucy, kActorMcCoy) < 84 && !Player_Query_Combat_Mode() && Actor_Query_Friendliness_To_Other(kActorLucy, kActorMcCoy) > 40) { Actor_Set_Goal_Number(kActorLucy, 232); } if (Actor_Query_Goal_Number(kActorLucy) == 235) { Actor_Query_XYZ(kActorMcCoy, &x, &y, &z); if (z > -875.0f) { Game_Flag_Set(586); Actor_Set_Goal_Number(kActorLucy, 236); } } if (Actor_Query_Goal_Number(kActorLucy) == 237) { Actor_Query_XYZ(kActorMcCoy, &x, &y, &z); if (x > 350.0f) { Game_Flag_Set(585); Actor_Set_Goal_Number(kActorLucy, 238); } } return false; }
void SceneScriptDR04::SceneFrameAdvanced(int frame) { if (Game_Flag_Query(kFlagDR05ViewExplosion)) { Game_Flag_Reset(kFlagDR05ViewExplosion); Game_Flag_Reset(kFlagDR05BombWillExplode); Scene_Loop_Set_Default(kDR04LoopMainPostExplosion); Scene_Loop_Start_Special(kSceneLoopModeOnce, kDR04LoopDR04Explosion, true); Music_Stop(4); Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiPerished); } else { if (Game_Flag_Query(kFlagDR05BombWillExplode)) { Game_Flag_Reset(kFlagDR05BombWillExplode); Game_Flag_Set(kFlagDR05BombExploded); Scene_Loop_Set_Default(kDR04LoopMainPostExplosion); Scene_Loop_Start_Special(kSceneLoopModeOnce, kDR04LoopDR04Explosion, true); Item_Remove_From_World(kItemBomb); } switch (frame) { case 193: Sound_Play(301, 100, 0, 100, 50); Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiChooseFate); Player_Loses_Control(); Actor_Force_Stop_Walking(kActorMcCoy); if (farEnoughFromExplosion()) { if (Player_Query_Combat_Mode()) { Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatHit); } else { Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeHit); } } else { Sound_Play_Speech_Line(kActorMcCoy, 9905, 100, 0, 99); Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie); Actor_Retired_Here(kActorMcCoy, 6, 6, true, -1); } Player_Gains_Control(); break; case 235: if (Actor_Query_Goal_Number(kActorMoraji) != kGoalMorajiJump && Actor_Query_Goal_Number(kActorMoraji) != kGoalMorajiLayDown && Actor_Query_Goal_Number(kActorMoraji) != kGoalMorajiPerished ) { Actor_Set_Goal_Number(kActorOfficerGrayford, 101); } Scene_Exits_Enable(); break; case 237: Overlay_Play("DR04OVER", 0, true, true, 0); break; } } }
bool AIScriptBulletBob::Update() { if (Game_Flag_Query(kFlagRC04McCoyShotBob) && Actor_Query_Goal_Number(kActorBulletBob) != kGoalBulletBobDead ) { Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobDead); } if ( Player_Query_Combat_Mode() && Player_Query_Current_Scene() == kSceneRC04 && !Game_Flag_Query(kFlagRC04McCoyCombatMode) && Global_Variable_Query(kVariableChapter) < 4 ) { AI_Countdown_Timer_Reset(kActorBulletBob, 2); AI_Countdown_Timer_Start(kActorBulletBob, 2, 10); Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobWarningMcCoy); Actor_Modify_Friendliness_To_Other(kActorBulletBob, kActorMcCoy, -15); Game_Flag_Set(kFlagRC04McCoyCombatMode); } else if ( Actor_Query_Goal_Number(kActorBulletBob) == kGoalBulletBobWarningMcCoy && !Player_Query_Combat_Mode() ) { AI_Countdown_Timer_Reset(kActorBulletBob, 2); Game_Flag_Reset(kFlagRC04McCoyCombatMode); Game_Flag_Set(kFlagRC04McCoyWarned); Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobDefault); } if ( Actor_Query_Goal_Number(kActorBulletBob) == kGoalBulletBobShootMcCoy && !Game_Flag_Query(kFlagRC04BobShootMcCoy) && _animationState == 0 ) { Actor_Face_Heading(kActorBulletBob, 208, false); _animationFrame = 0; _animationState = 2; Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobShotMcCoy); Game_Flag_Set(kFlagRC04BobShootMcCoy); return true; } if (Game_Flag_Query(kFlagRC04McCoyWarned) && Player_Query_Combat_Mode() && Actor_Query_Goal_Number(kActorBulletBob) != kGoalBulletBobDead ) { Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobShootMcCoy); return true; } return false; }
bool AIScriptMutant2::Update() { if (Global_Variable_Query(kVariableChapter) == 4) { switch (Actor_Query_Goal_Number(kActorMutant2)) { case 401: if (Actor_Query_Which_Set_In(kActorMutant2) == Player_Query_Current_Set() && (Actor_Query_Friendliness_To_Other(kActorMutant2, kActorMcCoy) < 20 || Actor_Query_Combat_Aggressiveness(kActorMutant2) >= 60 ) ) { Actor_Set_Goal_Number(kActorMutant2, 410); } break; case 404: if (!Game_Flag_Query(kFlagMutantsPaused)) { Actor_Set_Goal_Number(kActorMutant2, 403); } break; case 410: if (Actor_Query_Which_Set_In(kActorMutant2) != Player_Query_Current_Set()) { Non_Player_Actor_Combat_Mode_Off(kActorMutant2); Actor_Set_Goal_Number(kActorMutant2, 403); } break; case 599: if (Actor_Query_Which_Set_In(kActorMutant2) != Player_Query_Current_Set()) { Actor_Set_Goal_Number(kActorMutant2, 403); } break; } if (Game_Flag_Query(kFlagMutantsPaused) && Actor_Query_Goal_Number(kActorMutant2) != 599 ) { Actor_Set_Goal_Number(kActorMutant2, 404); } } else if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorMutant2) != 590 ) { if (Actor_Query_Which_Set_In(kActorMutant2) != Player_Query_Current_Set()) { Actor_Set_Goal_Number(kActorMutant2, 590); } } return false; }
void AIScriptClovis::CompletedMovementTrack() { switch (Actor_Query_Goal_Number(kActorClovis)) { case kGoalClovisBB11WalkToMcCoy: Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11StopSadik); break; case kGoalClovisBB11StopSadik: Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11TalkWithSadik); break; case 401: AI_Movement_Track_Flush(kActorClovis); if (Player_Query_Current_Scene() == 92) { Actor_Set_Goal_Number(kActorClovis, 402); } else { Actor_Set_Goal_Number(kActorClovis, 400); } break; default: return; //false; } return; //true; }
void ScriptMA07::PlayerWalkedIn() { if (Game_Flag_Query(673)) { Loop_Actor_Walk_To_XYZ(0, -268.0f, -162.8f, 188.0f, 0, 0, false, 0); Game_Flag_Reset(673); } if (Actor_Query_Goal_Number(57) == 300) { Actor_Set_Goal_Number(57, 305); } if (Game_Flag_Query(58)) { Game_Flag_Reset(58); } if (!Game_Flag_Query(648) && Game_Flag_Query(671) && Global_Variable_Query(1) == 4) { Scene_Exits_Disable(); Actor_Set_Goal_Number(53, 300); } if (Game_Flag_Query(666)) { Actor_Voice_Over(1360, 99); Actor_Voice_Over(1370, 99); Actor_Voice_Over(1380, 99); Actor_Voice_Over(1390, 99); Actor_Voice_Over(1400, 99); Delay(1000); Game_Flag_Reset(666); Game_Flag_Set(34); Set_Enter(10, 49); } //return false; }
bool SceneScriptRC01::ClickedOnActor(int actorId) { if (actorId == kActorOfficerLeary && Global_Variable_Query(kVariableChapter) == 1) { if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorOfficerLeary, 36, true, false)) { Actor_Face_Actor(kActorMcCoy, kActorOfficerLeary, true); Actor_Face_Actor(kActorOfficerLeary, kActorMcCoy, true); if (Actor_Query_Goal_Number(kActorOfficerLeary) == kGoalOfficerLearyRC01WalkToCrowd) { Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyDefault); } if (Game_Flag_Query(kFlagRC01GotOfficersStatement)) { Actor_Says(kActorMcCoy, 4535, 13); Game_Flag_Set(kFlagRC01McCoyAndOfficerLearyTalking); if (Actor_Clue_Query(kActorOfficerLeary, kClueCrowdInterviewA) && !Actor_Clue_Query(kActorMcCoy, kClueCrowdInterviewA)) { Actor_Face_Object(kActorOfficerLeary, "70_1", true); Actor_Says(kActorOfficerLeary, 100, 15); Actor_Face_Actor(kActorOfficerLeary, kActorMcCoy, true); Actor_Clue_Acquire(kActorMcCoy, kClueCrowdInterviewA, true, kActorOfficerLeary); Game_Flag_Reset(kFlagRC01McCoyAndOfficerLearyTalking); } else if (Actor_Clue_Query(kActorOfficerLeary, kClueCrowdInterviewB) && !Actor_Clue_Query(kActorMcCoy, kClueCrowdInterviewB)) { Actor_Face_Object(kActorOfficerLeary, "70_5", true); Actor_Says(kActorOfficerLeary, 120, 19); Actor_Face_Actor(kActorOfficerLeary, kActorMcCoy, true); Actor_Says(kActorOfficerLeary, 130, 14); I_Sez("JM: Did it have a huge, ugly piece of chrome on it?"); Actor_Clue_Acquire(kActorMcCoy, kClueCrowdInterviewB, true, kActorOfficerLeary); Game_Flag_Reset(kFlagRC01McCoyAndOfficerLearyTalking); } else { Actor_Says(kActorOfficerLeary, 90, 16); I_Sez("JM: This officer has a talent for vivid metaphors."); if (!Game_Flag_Query(kFlagRC01McCoyAndOfficerLearyArtMetaphor)) { I_Sez("DL: What is that supposed to mean? I didn't write this line..."); Actor_Says(kActorMcCoy, 4540, 16); Game_Flag_Set(kFlagRC01McCoyAndOfficerLearyArtMetaphor); } Game_Flag_Reset(kFlagRC01McCoyAndOfficerLearyTalking); } } else { I_Sez("MG: Hey, leave that officer alone. Can't you see he's busy?"); I_Sez("JM: (...mmm, donuts...)"); Game_Flag_Set(kFlagRC01GotOfficersStatement); Actor_Clue_Acquire(kActorMcCoy, kClueOfficersStatement, true, kActorOfficerLeary); Actor_Says(kActorMcCoy, 4515, 13); Game_Flag_Set(kFlagRC01McCoyAndOfficerLearyTalking); Actor_Says(kActorOfficerLeary, 40, 13); if (!Game_Flag_Query(kFlagRC02Entered)) { Actor_Says(kActorOfficerLeary, 50, 14); Actor_Says(kActorOfficerLeary, 60, 15); I_Sez("MG: It's all fun and games until someone loses a tiger cub."); Actor_Says(kActorMcCoy, 4520, 18); Actor_Says(kActorOfficerLeary, 70, 16); Actor_Says(kActorMcCoy, 4525, 14); Actor_Says(kActorOfficerLeary, 80, 18); Actor_Says(kActorMcCoy, 4530, 15); } Game_Flag_Reset(kFlagRC01McCoyAndOfficerLearyTalking); } } return true; } return false; }
void ScriptMA04::sub_403DA8() { if (!Loop_Actor_Walk_To_Scene_Object(0, "BED-SHEETS", 12, 1, false)) { Actor_Says(0, 8530, 12); Music_Stop(4); if (sub_402820() || sub_402758()) { Overlay_Remove("MA04OVER"); } Player_Loses_Control(); Game_Flag_Set(647); if ((Game_Flag_Query(40) || Game_Flag_Query(41)) && Global_Variable_Query(1) == 1) { if (Actor_Query_Goal_Number(19) == 599) { Actor_Put_In_Set(19, 91); Actor_Set_At_Waypoint(19, 33, 0); } Game_Flag_Set(678); Global_Variable_Set(1, 2); Chapter_Enter(2, 10, 50); if (Query_Difficulty_Level() != 0) { if (!Game_Flag_Query(723)) { Global_Variable_Increment(2, 200); } } } else { Set_Enter(10, 50); } Scene_Loop_Start_Special(1, 3, 0); } }
void ScriptMA04::sub_402F2C() { Actor_Says(6, 530, 3); Actor_Says(0, 2545, 19); Actor_Says(6, 540, 3); Actor_Says(6, 550, 3); Actor_Says(0, 2550, 13); Actor_Says(6, 560, 3); Actor_Says(0, 2555, 19); Actor_Says(6, 570, 3); Actor_Says(0, 2560, 17); Actor_Says(6, 580, 3); if (Game_Flag_Query(165) || Actor_Query_Goal_Number(9) == 2) { Actor_Says(6, 630, 3); Actor_Says_With_Pause(0, 2575, 0.0f, 15); if (!Game_Flag_Query(378)) { Actor_Says(6, 640, 3); } Actor_Clue_Acquire(0, 142, 1, -1); } else { Actor_Says(6, 590, 3); Actor_Says(0, 2565, 12); Actor_Says(6, 600, 3); Actor_Says(6, 610, 3); Actor_Says(6, 620, 3); Actor_Says(0, 2570, 13); Actor_Says_With_Pause(6, 630, 0.0f, 3); Actor_Says_With_Pause(0, 2575, 0.0f, 15); if (!Game_Flag_Query(378)) { Actor_Says(6, 640, 3); } Actor_Clue_Acquire(0, 141, 1, -1); } Sound_Play(123, 100, 0, 0, 50); }
bool AIScriptMutant3::ShotAtAndHit() { if (Actor_Query_Goal_Number(kActorMutant3) != 410) { Actor_Modify_Combat_Aggressiveness(kActorMutant3, 20); Actor_Modify_Friendliness_To_Other(kActorMutant3, 0, -20); } return false; }
bool SceneScriptUG16::ClickedOnActor(int actorId) { if (Actor_Query_Goal_Number(kActorLuther) < 490) { sub_401D78(); return true; } return false; }
bool SceneScriptHF03::ClickedOnActor(int actorId) { if (actorId == 6 && Actor_Query_Goal_Number(kActorLucy) == 205) { if (Game_Flag_Query(46) ? !Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 377, 0, 1, false) : !Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 378, 0, 1, false)) { Actor_Face_Actor(kActorMcCoy, kActorLucy, true); if (!Game_Flag_Query(613)) { Game_Flag_Set(613); if (Game_Flag_Query(46)) { Actor_Says(kActorMcCoy, 1605, 15); Actor_Says(kActorLucy, 100, 12); Actor_Says(kActorMcCoy, 1610, 14); } else { Actor_Says(kActorMcCoy, 1615, 16); Actor_Says(kActorLucy, 110, 13); } Actor_Says(kActorLucy, 120, 13); Actor_Says(kActorMcCoy, 1620, 14); Actor_Says(kActorLucy, 130, 17); Actor_Says(kActorMcCoy, 1625, 15); if (Game_Flag_Query(46)) { Actor_Says(kActorLucy, 140, 12); Actor_Says(kActorLucy, 150, 13); Actor_Says(kActorLucy, 160, 15); } else { Actor_Says(kActorLucy, 170, 12); Actor_Says(kActorLucy, 180, 13); Actor_Says(kActorLucy, 190, 15); } } sub_401C80(); } } return false; }
void SceneScriptCT05::PlayerWalkedIn() { if (Game_Flag_Query(kFlagCT04toCT05)) { Player_Loses_Control(); Game_Flag_Reset(kFlagCT04toCT05); if (Player_Query_Combat_Mode()) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -308.18f, -109.91f, 674.77f, 0, false, true, false); } else { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -308.18f, -109.91f, 674.77f, 0, false, false, false); } Player_Gains_Control(); } if (Game_Flag_Query(kFlagCT06toCT05)) { Footstep_Sound_Override_On(2); Loop_Actor_Travel_Stairs(kActorMcCoy, 7, false, kAnimationModeIdle); Actor_Set_At_XYZ(kActorMcCoy, 90.73f, -19.91f, 164.97f, 520); Loop_Actor_Travel_Stairs(kActorMcCoy, 10, false, kAnimationModeIdle); Game_Flag_Reset(kFlagCT06toCT05); Footstep_Sound_Override_Off(); if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoCT01Left && Game_Flag_Query(kFlagCT06ZubenPhoto) ) { Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT05WalkThrough); } } }
void ScriptNR08::SceneLoaded() { Obstacle_Object("BOX283", true); Unobstacle_Object("BOX283", true); if (Actor_Query_Goal_Number(3) == 210) { Actor_Change_Animation_Mode(3, 79); } }
void SceneScriptCT05::InitializeScene() { if (Game_Flag_Query(kFlagCT12toCT05)) { Game_Flag_Reset(kFlagCT12toCT05); Setup_Scene_Information(-128.42f, -109.91f, 112.83f, 516); } else if (Game_Flag_Query(kFlagCT06toCT05)) { Setup_Scene_Information( 192.35f, 43.09f, 128.97f, 768); } else { Setup_Scene_Information( -375.0f, -109.91f, 750.0f, 600); } if (Game_Flag_Query(kFlagCT05WarehouseOpen)) { Scene_Exit_Add_2D_Exit(0, 228, 205, 293, 300, 0); } Scene_Exit_Add_2D_Exit(1, 320, 458, 639, 479, 2); Scene_Exit_Add_2D_Exit(2, 380, 110, 542, 300, 0); Ambient_Sounds_Add_Looping_Sound(kSfxCTROOFL1, 15, -100, 1); Ambient_Sounds_Add_Looping_Sound(kSfxCTROOFR1, 15, 100, 1); Ambient_Sounds_Add_Looping_Sound(kSfxCTAMBR1, 13, -100, 1); Ambient_Sounds_Add_Sound(kSfxPSDOOR1, 5, 20, 8, 10, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(kSfxPSDOOR2, 5, 20, 8, 10, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(kSfxCTDRONE1, 5, 30, 18, 30, -100, 100, -101, -101, 0, 0); if (Game_Flag_Query(kFlagCT05WarehouseOpen)) { Scene_Loop_Set_Default(2); } else { Scene_Loop_Set_Default(0); } if (Actor_Query_Goal_Number(kActorGaff) == kGoalGaffCT12WaitForMcCoy) { Overlay_Play("ct05over", 0, true, false, 0); } }