Exemplo n.º 1
0
bool SceneScriptCT06::ClickedOnExit(int exitId) {
	if (exitId == 0) {
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 20.41f, -58.23f, -2.17f, 0, 1, false, 0)) {
			Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
			Ambient_Sounds_Remove_All_Looping_Sounds(1);
			Game_Flag_Set(78);
			Set_Enter(28, kSceneCT05);
			Game_Flag_Reset(212);
		}
		return true;
	}
	if (exitId == 1) {
		if (Actor_Query_Goal_Number(kActorZuben) == 13) {
			if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 203.91f, -58.02f, 0.47f, 0, 1, false, 0)) {
				Ambient_Sounds_Remove_Sound(196, true);
				Ambient_Sounds_Remove_Sound(197, true);
				Ambient_Sounds_Remove_Sound(198, true);
				Ambient_Sounds_Remove_Sound(199, true);
				Player_Loses_Control();
				Actor_Set_Goal_Number(kActorZuben, 11);
				Game_Flag_Reset(212);
			}
			return true;
		}
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 203.91f, -58.02f, 0.47f, 0, 1, false, 0)) {
			if (Global_Variable_Query(kVariableChapter) < 3) {
				Actor_Face_Object(kActorMcCoy, "DOOR", true);
				Actor_Says(kActorMcCoy, 8522, 12);
			} else {
				Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
				Ambient_Sounds_Remove_All_Looping_Sounds(1);
				Game_Flag_Set(79);
				Set_Enter(6, kSceneCT08);
				Game_Flag_Reset(212);
			}
		}
	}
	return false;
}
Exemplo n.º 2
0
bool ScriptMA04::ClickedOn2DRegion(int region) {
	if (Player_Query_Combat_Mode()) {
		return false;
	}
	if (region == 1) {
		sub_403DA8();
		return true;
	}
	if (region == 0) {
		if (!Loop_Actor_Walk_To_XYZ(0, -7176.0f, 954.0f, 1806.0f, 0, 1, false, 0)) {
			Actor_Face_Heading(0, 256, false);
			if (sub_402758()) {
				Actor_Says(0, 2680, 0);
				Ambient_Sounds_Remove_Sound(403, true);
				Sound_Play(123, 100, 0, 0, 50);
				Overlay_Remove("MA04OVER");
				Delay(500);
				if (Game_Flag_Query(653)) {
					if (Global_Variable_Query(45) == 2) {
						sub_4028A8();
					} else if (Global_Variable_Query(45) == 3) {
						sub_402F2C();
					} else {
						sub_4034D8();
					}
				} else {
					sub_4032A0();
				}
				Music_Play(2, 52, 0, 3, -1, 0, 0);
				return false;
			}
			if (Actor_Clue_Query(5, 222) && !Game_Flag_Query(649)) {
				Sound_Play(123, 100, 0, 0, 50);
				Overlay_Remove("MA04OVER");
				Delay(500);
				Actor_Says(5, 310, 3);
				Actor_Says(5, 320, 3);
				if (!Game_Flag_Query(378) && Global_Variable_Query(1) < 3) {
					Actor_Voice_Over(1300, 99);
					Actor_Voice_Over(1310, 99);
					Actor_Voice_Over(1320, 99);
				}
				Actor_Says(0, 2445, 13);
				Sound_Play(123, 100, 0, 0, 50);
				Game_Flag_Set(649);
				return true;
			}
			if (Actor_Clue_Query(6, 215) && !Game_Flag_Query(650)) {
				Sound_Play(123, 100, 0, 0, 50);
				Overlay_Remove("MA04OVER");
				Delay(500);
				Actor_Says(6, 500, 3);
				Actor_Says(6, 510, 3);
				if (!Game_Flag_Query(378) && Global_Variable_Query(1) < 3) {
					Actor_Voice_Over(1330, 99);
					Actor_Voice_Over(1340, 99);
					Actor_Voice_Over(1350, 99);
				}
				Actor_Says(0, 2445, 13);
				Sound_Play(123, 100, 0, 0, 50);
				Game_Flag_Set(650);
				return true;
			}
			Actor_Says(0, 2670, 13);
			if (!Game_Flag_Query(378)) {
				Actor_Says(0, 2675, 17);
			}
		}
		return true;
	}
	return false;
}