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; }
void SceneScriptHF01::PlayerWalkedIn() { if (Game_Flag_Query(663)) { ADQ_Flush(); ADQ_Add(kActorOfficerGrayford, 280, 3); Actor_Put_In_Set(kActorOfficerLeary, 37); Actor_Set_At_XYZ(kActorOfficerLeary, 8.2f, 8.0f, -346.67f, 1021); Actor_Put_In_Set(kActorOfficerGrayford, 37); Actor_Set_At_XYZ(kActorOfficerGrayford, 51.21f, 8.0f, -540.78f, 796); Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateUncover, true, kActorMcCoy, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 0, 100, 300, false); Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateUncover, true, kActorMcCoy, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 0, 100, 300, false); } if (!Game_Flag_Query(165) && Actor_Query_Goal_Number(kActorCrazylegs) != 2) { if (Actor_Clue_Query(kActorMcCoy, kCluePhoneCallLucy1) && Global_Variable_Query(kVariableAffectionTowards) == 3 && Actor_Query_Goal_Number(kActorLucy) != 599) { Actor_Put_In_Set(kActorLucy, 37); Actor_Set_At_XYZ(kActorLucy, -5.0f, 8.0f, -622.0f, 419); Actor_Set_Targetable(kActorLucy, true); } else if (Actor_Clue_Query(kActorMcCoy, kCluePhoneCallDektora1) && Global_Variable_Query(kVariableAffectionTowards) == 2 && Actor_Query_Goal_Number(kActorDektora) != 599) { Actor_Put_In_Set(kActorDektora, 37); Actor_Set_At_XYZ(kActorDektora, -5.0f, 8.0f, -622.0f, 419); Actor_Set_Targetable(kActorDektora, true); } } if (Game_Flag_Query(617)) { Actor_Set_Goal_Number(kActorSteele, 280); Game_Flag_Reset(617); //return true; return; } if (Game_Flag_Query(652)) { Game_Flag_Reset(652); Actor_Voice_Over(950, kActorVoiceOver); Actor_Voice_Over(960, kActorVoiceOver); Actor_Voice_Over(970, kActorVoiceOver); Actor_Voice_Over(980, kActorVoiceOver); } else if (!Game_Flag_Query(377) && Global_Variable_Query(kVariableChapter) < 4) { ADQ_Flush(); ADQ_Add(kActorMurray, 0, 14); ADQ_Add(kActorMurray, 10, 3); ADQ_Add(kActorMia, 0, 3); Actor_Face_Actor(kActorMurray, kActorMia, true); ADQ_Add(kActorMurray, 20, 13); ADQ_Add(kActorMia, 10, 3); ADQ_Add(kActorMurray, 30, 3); ADQ_Add(kActorMia, 20, 3); Actor_Face_Heading(kActorMurray, 271, false); Game_Flag_Set(377); } if (Game_Flag_Query(311)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 124.0f, 8.0f, -724.0f, 0, 1, false, 0); } else if (Game_Flag_Query(309)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 406.0f, 8.0f, -717.0f, 0, 1, false, 0); } else if (!Game_Flag_Query(313)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 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 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; }
bool AIScriptDeskClerk::GoalChanged(int currentGoalNumber, int newGoalNumber) { switch (newGoalNumber) { case kGoalDeskClerkDefault: case kGoalDeskClerkRecovered: Actor_Put_In_Set(kActorDeskClerk, kSetCT09); Actor_Set_At_XYZ(kActorDeskClerk, 282.0f, 360.52f, 743.0f, 513); break; case kGoalDeskClerkKnockedOut: case kGoalDeskClerkGone: Actor_Put_In_Set(kActorDeskClerk, kSetFreeSlotH); Actor_Set_At_Waypoint(kActorDeskClerk, 40, 0); break; } 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 SceneScriptCT06::InitializeScene() { if (Game_Flag_Query(77)) { Setup_Scene_Information(20.41f, -58.23f, 2.17f, 247); Game_Flag_Reset(77); } else if (Game_Flag_Query(144)) { Setup_Scene_Information(203.91f, -58.02f, 0.47f, 768); } else { Setup_Scene_Information(175.91f, -58.23f, 24.47f, 768); } Scene_Exit_Add_2D_Exit(0, 0, 440, 639, 479, 2); Scene_Exit_Add_2D_Exit(1, 401, 162, 536, 317, 0); if (Game_Flag_Query(kFlagZubenRetired) && Actor_Query_In_Set(kActorZuben, 30)) { Actor_Put_In_Set(kActorZuben, 29); Actor_Set_At_XYZ(kActorZuben, 58.41f, -58.23f, -24.97f, 240); Actor_Retired_Here(kActorZuben, 72, 36, 1, kActorMcCoy); } Ambient_Sounds_Add_Looping_Sound(381, 100, 1, 1); Ambient_Sounds_Add_Looping_Sound(205, 20, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Sound(67, 80, 180, 16, 25, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(68, 50, 180, 16, 25, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(379, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(380, 70, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(377, 60, 180, 50, 100, 0, 0, -101, -101, 0, 0); if (Actor_Query_Goal_Number(kActorZuben) == 13) { Ambient_Sounds_Add_Sound(196, 1, 5, 25, 25, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(197, 1, 5, 25, 25, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(198, 1, 5, 25, 25, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(199, 1, 5, 25, 25, -100, 100, -101, -101, 0, 0); } }
bool AIScriptGenericWalkerA::GoalChanged(int currentGoalNumber, int newGoalNumber) { if (newGoalNumber == 0) { AI_Movement_Track_Flush(kActorGenwalkerA); Actor_Put_In_Set(kActorGenwalkerA, kSetFreeSlotH); Global_Variable_Set(kVariableGenericWalkerAModel, -1); return false; } else if (newGoalNumber == 1) { return true; } else if (newGoalNumber == 200) { Actor_Put_In_Set(kActorGenwalkerA, kSetRC04); Actor_Set_At_XYZ(kActorGenwalkerA, 0.0, 36.0, -172.0, 491); Actor_Change_Animation_Mode(kActorGenwalkerA, kAnimationModeCombatIdle); return true; } return false; }
bool AIScriptRajif::GoalChanged(int currentGoalNumber, int newGoalNumber) { if (newGoalNumber == 300) { Actor_Put_In_Set(kActorRajif, kSetMA02_MA04); Actor_Set_At_XYZ(kActorRajif, -73.34f, -140.40f, 342.0f, 300); Actor_Change_Animation_Mode(kActorRajif, 0); return true; } if (newGoalNumber == 599) { Actor_Put_In_Set(kActorRajif, kSetFreeSlotI); Actor_Set_At_Waypoint(kActorRajif, 41, 0); return true; } return false; }
void ScriptNR11::PlayerWalkedIn() { if (Actor_Query_Goal_Number(3) == 250) { Player_Set_Combat_Mode(true); if (Game_Flag_Query(47)) { Actor_Set_Goal_Number(1, 210); } } if (Game_Flag_Query(632)) { Game_Flag_Reset(632); Game_Flag_Set(634); Actor_Put_In_Set(3, 99); Actor_Set_At_Waypoint(3, 41, 0); Actor_Set_Invisible(0, false); Player_Set_Combat_Mode(false); Player_Gains_Control(); if (Game_Flag_Query(47)) { if (Actor_Query_Goal_Number(1) == 211) { Actor_Set_At_XYZ(0, -37.41f, 0.33f, -86.0f, 26); Delay(500); Actor_Face_Current_Camera(0, true); Delay(750); Actor_Says(0, 5290, 12); Delay(1000); Actor_Set_Goal_Number(1, 212); Actor_Face_Actor(0, 1, true); } else { Actor_Set_At_XYZ(0, -15.53f, 0.33f, 73.49f, 954); Actor_Modify_Friendliness_To_Other(1, 0, 3); Delay(1500); Actor_Says(0, 3805, 12); Actor_Face_Actor(0, 1, true); Actor_Face_Actor(1, 0, true); Actor_Says_With_Pause(1, 1720, 0.3f, 16); Actor_Says(0, 3810, 16); Actor_Says_With_Pause(1, 1730, 0.2f, 14); Actor_Says(1, 1740, 15); Actor_Set_Goal_Number(3, 599); Actor_Put_In_Set(3, 99); Actor_Set_At_Waypoint(3, 41, 0); Actor_Set_Goal_Number(1, 275); } } else { Actor_Set_Goal_Number(0, 500); } } // return true; }
bool AIScriptMia::GoalChanged(int currentGoalNumber, int newGoalNumber) { if (newGoalNumber == 300) { Actor_Put_In_Set(kActorMia, kSetFreeSlotH); Actor_Set_At_Waypoint(kActorMia, 40, 0); } return false; }
void SceneScriptBB05::PlayerWalkedIn() { if (Game_Flag_Query(298)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 95.0f, -60.31f, 303.0f, 0, 0, false, 0); Game_Flag_Reset(298); } else if (Game_Flag_Query(300)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 231.0f, -60.31f, 203.0f, 0, 0, false, 0); Game_Flag_Reset(300); } else if (Game_Flag_Query(302)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 111.0f, -60.31f, -24.0f, 0, 0, false, 0); Game_Flag_Reset(302); } else { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -76.0f, -60.31f, 131.0f, 0, 0, false, 0); Game_Flag_Reset(285); } if (Actor_Query_Goal_Number(kActorSebastian) == 200) { Actor_Face_Actor(kActorSebastian, kActorMcCoy, true); Actor_Face_Actor(kActorMcCoy, kActorSebastian, true); Actor_Says(kActorSebastian, 120, 13); Actor_Says(kActorMcCoy, 7030, 15); Actor_Says(kActorSebastian, 130, 17); Actor_Says(kActorSebastian, 140, 16); Actor_Says(kActorSebastian, 150, 14); Actor_Says(kActorSebastian, 160, 15); Actor_Says(kActorMcCoy, 7035, 14); Actor_Says(kActorSebastian, 170, 12); Actor_Says(kActorMcCoy, 7040, 14); Actor_Says(kActorSebastian, 180, 16); Actor_Says(kActorMcCoy, 7045, 14); if (Game_Flag_Query(399)) { Actor_Says(kActorSebastian, 190, 15); Actor_Says(kActorMcCoy, 7050, 17); Actor_Says(kActorSebastian, 200, 16); Actor_Says_With_Pause(kActorSebastian, 210, 1.5f, 14); Actor_Says(kActorMcCoy, 7055, 15); } else { Actor_Put_In_Set(kActorGeneralDoll, 22); Actor_Set_At_Waypoint(kActorGeneralDoll, 134, 0); Loop_Actor_Walk_To_Waypoint(kActorGeneralDoll, 135, 0, 0, false); Actor_Says(kActorGeneralDoll, 0, 3); Actor_Face_Actor(kActorMcCoy, kActorGeneralDoll, true); Actor_Face_Actor(kActorSebastian, kActorGeneralDoll, true); Actor_Says(kActorSebastian, 220, 13); Loop_Actor_Walk_To_Waypoint(kActorGeneralDoll, 134, 0, 0, false); Actor_Face_Actor(kActorSebastian, kActorMcCoy, true); Actor_Face_Actor(kActorMcCoy, kActorSebastian, true); Actor_Says(kActorSebastian, 230, 15); Actor_Says(kActorMcCoy, 7060, 17); Actor_Says(kActorSebastian, 240, 12); } Actor_Says(kActorMcCoy, 7065, 16); Actor_Says(kActorSebastian, 250, 16); Actor_Says(kActorMcCoy, 7070, 18); Actor_Set_Goal_Number(kActorSebastian, 205); Actor_Set_Goal_Number(kActorGeneralDoll, 201); Actor_Set_Goal_Number(kActorBryant, 101); Actor_Set_Goal_Number(kActorGeneralDoll, 200); } }
bool SceneScriptCT04::ClickedOn3DObject(const char *objectName, bool a2) { if (objectName) { if (!Game_Flag_Query(137) && !Game_Flag_Query(169) && !Actor_Query_Goal_Number(kActorTransient)) { Game_Flag_Set(137); Actor_Set_Goal_Number(kActorTransient, 2); } if (Game_Flag_Query(169) && !Game_Flag_Query(170) && !Game_Flag_Query(171) && !Game_Flag_Query(172) && Global_Variable_Query(1) == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -147.41f, -621.3f, 724.57f, 0, 1, false, 0)) { Player_Loses_Control(); Actor_Face_Heading(kActorMcCoy, 792, false); Actor_Put_In_Set(kActorTransient, 99); Actor_Set_At_XYZ(kActorTransient, 0, 0, 0, 0); Actor_Change_Animation_Mode(kActorMcCoy, 40); Actor_Voice_Over(320, kActorVoiceOver); Actor_Voice_Over(330, kActorVoiceOver); Actor_Voice_Over(340, kActorVoiceOver); Game_Flag_Set(170); Game_Flag_Set(173); } return false; } if (Game_Flag_Query(170)) { if (Game_Flag_Query(172)) { Actor_Voice_Over(270, kActorVoiceOver); Actor_Voice_Over(280, kActorVoiceOver); } else if (Game_Flag_Query(171)) { Actor_Voice_Over(250, kActorVoiceOver); Actor_Voice_Over(260, kActorVoiceOver); } else { Actor_Voice_Over(230, kActorVoiceOver); Actor_Voice_Over(240, kActorVoiceOver); Game_Flag_Reset(173); } return true; } if (Game_Flag_Query(174)) { if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 75, 0, 1, false)) { Actor_Face_Heading(kActorMcCoy, 707, false); Actor_Change_Animation_Mode(kActorMcCoy, 38); Ambient_Sounds_Play_Sound(553, 45, 30, 30, 0); Actor_Voice_Over(1810, kActorVoiceOver); Actor_Voice_Over(1820, kActorVoiceOver); return true; } return false; } if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 75, 0, 1, false)) { Actor_Face_Heading(kActorMcCoy, 707, false); Actor_Change_Animation_Mode(kActorMcCoy, 38); Actor_Clue_Acquire(kActorMcCoy, kClueLicensePlate, 1, -1); Item_Pickup_Spin_Effect(952, 392, 225); Game_Flag_Set(174); return true; } } return false; }
void AIScriptGaff::Initialize() { _animationFrame = 0; _animationState = 0; _animationStateNext = 0; _animationNext = 0; Actor_Put_In_Set(kActorGaff, kSetFreeSlotC); Actor_Set_Goal_Number(kActorGaff, kGoalGaffDefault); //return false; }
void AIScriptHysteriaPatron1::Initialize() { _animationFrame = 0; _animationState = 0; _animationStateNext = 0; _animationNext = 0; Actor_Put_In_Set(kActorHysteriaPatron1, kSetNR03); Actor_Set_At_XYZ(kActorHysteriaPatron1, 50.0f, -6.59f, -1030.0f, 524); }
void AIScriptLucy::FledCombat() { if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorLucy) == 450) { Actor_Put_In_Set(kActorLucy, kSetFreeSlotG); Actor_Set_At_Waypoint(kActorLucy, 39, 0); Actor_Set_Goal_Number(kActorLucy, 599); } return; //true; }
void SceneScriptUG05::PlayerWalkedIn() { if (Game_Flag_Query(663)) { if (Game_Flag_Query(368)) { Music_Stop(2); Actor_Put_In_Set(kActorOfficerGrayford, 78); Actor_Set_At_XYZ(kActorOfficerGrayford, 4.22f, -1.37f, -925.0f, 750); Actor_Set_Goal_Number(kActorOfficerGrayford, 599); Actor_Retired_Here(kActorOfficerGrayford, 70, 36, 1, -1); int v0 = sub_4021B0(); if (v0 == kActorDektora) { Actor_Put_In_Set(kActorDektora, 78); Actor_Set_At_XYZ(kActorDektora, -100.0f, -10.31f, -906.0f, 866); Actor_Force_Stop_Walking(kActorDektora); } else if (v0 == kActorLucy){ Actor_Put_In_Set(kActorLucy, 78); Actor_Set_At_XYZ(kActorLucy, -100.0f, -10.31f, -906.0f, 866); Actor_Force_Stop_Walking(kActorLucy); } } else { if (!Actor_Query_In_Set(kActorOfficerLeary, 78)) { Actor_Put_In_Set(kActorOfficerLeary, 78); Actor_Set_At_XYZ(kActorOfficerLeary, 0.0f, -1.37f, -1400.0f, 768); } if (!Actor_Query_In_Set(kActorOfficerGrayford, 78)) { ADQ_Flush(); ADQ_Add(kActorOfficerGrayford, 280, 3); Actor_Put_In_Set(kActorOfficerGrayford, 78); Actor_Set_At_XYZ(kActorOfficerGrayford, -16.0f, -1.37f, -960.0f, 768); } } } if (Game_Flag_Query(360)) { if (Game_Flag_Query(663) && !Game_Flag_Query(368)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -288.35f, 132.77f, -1092.36f, 0, 1, false, 0); } else { Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 0, 0); } } if (Game_Flag_Query(663)) { Game_Flag_Query(368); } Game_Flag_Reset(360); }
void SceneScriptDR03::InitializeScene() { if (Game_Flag_Query(226)) { Game_Flag_Reset(226); Setup_Scene_Information(330.31f, 4.27f, -910.91f, 297); } Setup_Scene_Information(330.31f, 4.27f, -910.91f, 297); Scene_Exit_Add_2D_Exit(0, 377, 122, 445, 266, 0); if (Global_Variable_Query(kVariableChapter) == 3) { Actor_Put_In_Set(kActorChew, 34); Actor_Set_At_XYZ(kActorChew, 431.21f, 4.27f, -776.26f, 0); } else { Actor_Put_In_Set(kActorChew, 34); Actor_Set_At_XYZ(kActorChew, 360.77f, 4.4f, -806.67f, 126); } Ambient_Sounds_Remove_All_Looping_Sounds(1); Ambient_Sounds_Add_Looping_Sound(110, 7, 0, 1); Ambient_Sounds_Add_Looping_Sound(109, 50, 0, 1); Ambient_Sounds_Add_Looping_Sound(95, 20, 70, 1); }
void ScriptUG05::PlayerWalkedIn() { if (Game_Flag_Query(663)) { if (Game_Flag_Query(368)) { Music_Stop(2); Actor_Put_In_Set(24, 78); Actor_Set_At_XYZ(24, 4.22f, -1.37f, -925.0f, 750); Actor_Set_Goal_Number(24, 599); Actor_Retired_Here(24, 70, 36, 1, -1); int v0 = sub_4021B0(); if (v0 == 3) { Actor_Put_In_Set(3, 78); Actor_Set_At_XYZ(3, -100.0f, -10.31f, -906.0f, 866); Actor_Force_Stop_Walking(3); } else if (v0 == 6) { Actor_Put_In_Set(6, 78); Actor_Set_At_XYZ(6, -100.0f, -10.31f, -906.0f, 866); Actor_Force_Stop_Walking(6); } } else { if (!Actor_Query_In_Set(23, 78)) { Actor_Put_In_Set(23, 78); Actor_Set_At_XYZ(23, 0.0f, -1.37f, -1400.0f, 768); } if (!Actor_Query_In_Set(24, 78)) { ADQ_Flush(); ADQ_Add(24, 280, 3); Actor_Put_In_Set(24, 78); Actor_Set_At_XYZ(24, -16.0f, -1.37f, -960.0f, 768); } } } if (Game_Flag_Query(360)) { if (Game_Flag_Query(663) && !Game_Flag_Query(368)) { Loop_Actor_Walk_To_XYZ(0, -288.35f, 132.77f, -1092.36f, 0, 1, false, 0); } else { Loop_Actor_Travel_Stairs(0, 2, 0, 0); } } if (Game_Flag_Query(663)) { Game_Flag_Query(368); } Game_Flag_Reset(360); }
void AIScriptMia::Initialize() { _animationFrame = 0; _animationState = 0; _animationStateNext = 0; _animationNext = 0; _flag1 = false; Actor_Put_In_Set(kActorMia, kSetHF01); Actor_Set_At_XYZ(kActorMia, 606.77f, -0.01f, -214.3f, 511); Actor_Set_Goal_Number(kActorMia, 0); }
bool AIScriptGenericWalkerC::GoalChanged(int currentGoalNumber, int newGoalNumber) { if (newGoalNumber == 0) { AI_Movement_Track_Flush(kActorGenwalkerC); Actor_Put_In_Set(kActorGenwalkerC, kSetFreeSlotH); Global_Variable_Set(kVariableGenericWalkerCModel, -1); return false; } else if (newGoalNumber == 1) { return true; } return false; }
void ScriptHF01::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (!Game_Flag_Query(312) && !Game_Flag_Query(308) && !Game_Flag_Query(310) && !Game_Flag_Query(722)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); Outtake_Play(35, 1, -1); Outtake_Play(38, 1, -1); } Game_Flag_Reset(722); if (Actor_Query_Goal_Number(6) == 450) { Actor_Put_In_Set(6, 97); Actor_Set_At_Waypoint(6, 39, 0); Actor_Set_Goal_Number(6, 599); } if (Actor_Query_Goal_Number(3) == 450) { Actor_Put_In_Set(3, 97); Actor_Set_At_Waypoint(3, 39, 0); Actor_Set_Goal_Number(3, 599); } }
void AIScriptCrazylegs::Initialize() { _animationFrame = 0; _animationState = 0; _animationStateNext = 0; _animationNext = 0; _flag = false; World_Waypoint_Set(360, 41, -103.0f, 40.63f, -53.0f); Actor_Put_In_Set(kActorCrazylegs, kSetHF05); Actor_Set_At_XYZ(kActorCrazylegs, -33.0f, 40.63f, 16.0f, 845); }
void AIScriptMutant1::Initialize() { _animationFrame = 0; _animationState = 0; _animationStateNext = 0; _animationNext = 0; _flag = 0; Actor_Put_In_Set(kActorMutant1, kSetFreeSlotG); Actor_Set_At_Waypoint(kActorMutant1, 39, 0); Actor_Set_Goal_Number(kActorMutant1, 400); }
void SceneScriptHF01::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (!Game_Flag_Query(312) && !Game_Flag_Query(308) && !Game_Flag_Query(310) && !Game_Flag_Query(722)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); Outtake_Play(kOuttakeInside2, true, -1); Outtake_Play(kOuttakeTowards3, true, -1); } Game_Flag_Reset(722); if (Actor_Query_Goal_Number(kActorLucy) == 450) { Actor_Put_In_Set(kActorLucy, 97); Actor_Set_At_Waypoint(kActorLucy, 39, 0); Actor_Set_Goal_Number(kActorLucy, 599); } if (Actor_Query_Goal_Number(kActorDektora) == 450) { Actor_Put_In_Set(kActorDektora, 97); Actor_Set_At_Waypoint(kActorDektora, 39, 0); Actor_Set_Goal_Number(kActorDektora, 599); } }
void SceneScriptBB05::SceneLoaded() { Obstacle_Object("PINHEAD", true); Obstacle_Object("X2WALLS&MOLDNG05", true); Obstacle_Object("QUADPATCH04", true); Unobstacle_Object("BOX16", true); Clickable_Object("PINHEAD"); Clickable_Object("BOX06"); Unclickable_Object("BOX06"); Unclickable_Object("BOX14"); if (Actor_Query_Goal_Number(kActorSebastian) == 200) { Actor_Set_Goal_Number(kActorGeneralDoll, 299); Actor_Put_In_Set(kActorGeneralDoll, 97); Actor_Set_At_Waypoint(kActorGeneralDoll, 39, 0); } }
void SceneScriptUG18::SceneLoaded() { Obstacle_Object("MACHINE_01", true); Unobstacle_Object("PLATFM_RAIL 01", true); Unobstacle_Object("PLATFM_RAIL 02", true); Unobstacle_Object("OBSTACLE1", true); Clickable_Object("MACHINE_01"); Unclickable_Object("MACHINE_01"); if (Game_Flag_Query(kFlagUG18GuzzaScene)) { Actor_Put_In_Set(kActorGuzza, kSetFreeSlotI); Actor_Set_At_Waypoint(kActorGuzza, 41, 0); if (Actor_Query_Which_Set_In(kActorSadik) == kSetUG18) { Actor_Put_In_Set(kActorSadik, kSetFreeSlotA); Actor_Set_At_Waypoint(kActorSadik, 33, 0); } } if ( Game_Flag_Query(kFlagCallWithGuzza) && !Game_Flag_Query(kFlagUG18GuzzaScene) && Global_Variable_Query(kVariableChapter) == 4 ) { Item_Add_To_World(kItemBriefcase, 987, kSetUG18, -55.21f, 0.0f, -302.17f, 0, 12, 12, false, true, false, true); } }
void AIScriptSadik::Initialize() { _animationFrame = 0; _animationState = 0; _animationStateNext = 0; _animationNext = 0; _flag = 0; _var1 = 0; _var2 = 0; _var3 = 0; _var4 = 1; Actor_Put_In_Set(kActorSadik, kSetFreeSlotA); Actor_Set_At_Waypoint(kActorSadik, 33, 0); Actor_Set_Goal_Number(kActorSadik, kGoalSadikDefaut); }
void AIScriptSadik::Initialize() { _animationFrame = 0; _animationState = 0; _animationStateNext = 0; _animationNext = 0; _flag = 0; _nextSoundId = -1; // changed from original (0) to be more clear that this is an invalid sfx id _var2 = 0; _var3 = 0; _var4 = 1; Actor_Put_In_Set(kActorSadik, kSetFreeSlotA); Actor_Set_At_Waypoint(kActorSadik, 33, 0); Actor_Set_Goal_Number(kActorSadik, kGoalSadikDefaut); }
void ScriptNR07::sub_4018D4() { Actor_Set_Goal_Number(25, 201); Player_Loses_Control(); Actor_Set_At_XYZ(3, -136.0f, -73.0f, -18.0f, 300); Actor_Change_Animation_Mode(3, 71); Actor_Change_Animation_Mode(0, 21); Loop_Actor_Walk_To_XYZ(3, -102.0f, -73.5f, -233.0f, 0, 0, true, 0); if (Game_Flag_Query(47)) { Actor_Set_Goal_Number(3, 245); } else { Actor_Set_Goal_Number(3, 295); Game_Flag_Set(591); Actor_Put_In_Set(3, 91); Actor_Set_At_Waypoint(3, 33, 0); } Player_Gains_Control(); }
void ScriptTB06::InitializeScene() { Setup_Scene_Information(-16.0f, 149.0f, -466.0f, 990); Scene_Exit_Add_2D_Exit(0, 330, 195, 417, 334, 0); Ambient_Sounds_Add_Looping_Sound(236, 50, 0, 1); Ambient_Sounds_Add_Looping_Sound(237, 50, 0, 1); Ambient_Sounds_Add_Looping_Sound(285, 66, 0, 1); if (Game_Flag_Query(103)) { Scene_Loop_Set_Default(0); //return false; return; } else { Actor_Put_In_Set(21, 73); Actor_Set_At_XYZ(21, 135.0f, 151.0f, -671.0f, 800); Actor_Retired_Here(21, 60, 32, 1, -1); //return true; return; } }