Exemplo n.º 1
0
bool ScriptHF01::ClickedOnActor(int actorId) {
	int v1;
	if (Global_Variable_Query(45) == 2) {
		v1 = 3;
	} else if (Global_Variable_Query(45) == 3) {
		v1 = 6;
	} else {
		v1 = -1;
	}
	if (actorId == 22 || actorId == 31) {
		if (!Loop_Actor_Walk_To_XYZ(0, 504.04f, 8.0f, -242.17f, 12, 1, false, 0)) {
			ADQ_Flush();
			Actor_Face_Actor(0, 31, true);
			if (Game_Flag_Query(382)) {
				sub_4026B4();
			} else {
				Actor_Says(0, 1455, 15);
				Actor_Says(31, 40, 13);
				Actor_Says(0, 1460, 13);
				Actor_Says(31, 50, 12);
				Item_Pickup_Spin_Effect(951, 396, 359);
				Actor_Face_Heading(31, 271, false);
				Actor_Says(31, 60, 12);
				Actor_Says(0, 1465, 15);
				Actor_Face_Actor(31, 0, true);
				Actor_Says(31, 70, 13);
				Actor_Says(0, 1470, 14);
				Actor_Says(22, 30, 3);
				Actor_Says(31, 80, 15);
				Actor_Says(22, 50, 3);
				Actor_Says(31, 110, 14);
				Game_Flag_Set(382);
			}
			return true;
		}
		return false;
	}
	if (actorId == v1) {
		if (!Loop_Actor_Walk_To_Actor(0, actorId, 28, 1, false)) {
			if (Actor_Query_Goal_Number(v1) == 599) {
				Actor_Says(0, 8630, 13);
				return true;
			}
			if (Global_Variable_Query(1) == 5 && (Actor_Clue_Query(0, 139) || Actor_Clue_Query(0, 141)) && !Game_Flag_Query(165) && Actor_Query_Goal_Number(9) != 2 && Game_Flag_Query(653) && !Game_Flag_Query(662)) {
				Game_Flag_Set(662);
				Actor_Face_Actor(0, v1, true);
				Actor_Face_Actor(v1, 0, true);
				if (v1 == 3) {
					sub_4032DC();
				} else if (v1 == 6) {
					sub_403484();
				}
				Async_Actor_Walk_To_XYZ(v1, -175.0f, 8.0f, -617.0f, 0, false);
				Loop_Actor_Walk_To_XYZ(0, -137.0f, 8.0f, -577.0f, 0, 0, false, 1);
				Game_Flag_Set(312);
				Set_Enter(41, 38);
			}
		}
	}
	return false;
}
Exemplo n.º 2
0
bool SceneScriptHF01::ClickedOnActor(int actorId) {
	int v1;
	if (Global_Variable_Query(kVariableAffectionTowards) == 2) {
		v1 = kActorDektora;
	} else if (Global_Variable_Query(kVariableAffectionTowards) == 3) {
		v1 = kActorLucy;
	} else {
		v1 = -1;
	}
	if (actorId == kActorMia || actorId == kActorMurray) {
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 504.04f, 8.0f, -242.17f, 12, 1, false, 0)) {
			ADQ_Flush();
			Actor_Face_Actor(kActorMcCoy, kActorMurray, true);
			if (Game_Flag_Query(382)) {
				sub_4026B4();
			} else {
				Actor_Says(kActorMcCoy, 1455, 15);
				Actor_Says(kActorMurray, 40, 13);
				Actor_Says(kActorMcCoy, 1460, 13);
				Actor_Says(kActorMurray, 50, 12);
				Item_Pickup_Spin_Effect(951, 396, 359);
				Actor_Face_Heading(kActorMurray, 271, false);
				Actor_Says(kActorMurray, 60, 12);
				Actor_Says(kActorMcCoy, 1465, 15);
				Actor_Face_Actor(kActorMurray, kActorMcCoy, true);
				Actor_Says(kActorMurray, 70, 13);
				Actor_Says(kActorMcCoy, 1470, 14);
				Actor_Says(kActorMia, 30, 3);
				Actor_Says(kActorMurray, 80, 15);
				Actor_Says(kActorMia, 50, 3);
				Actor_Says(kActorMurray, 110, 14);
				Game_Flag_Set(382);
			}
			return true;
		}
		return false;
	}
	if (v1 != -1 && actorId == v1) {
		if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, actorId, 28, 1, false)) {
			if (Actor_Query_Goal_Number(v1) == 599) {
				Actor_Says(kActorMcCoy, 8630, 13);
				return true;
			}
			if (Global_Variable_Query(kVariableChapter) == 5 && (Actor_Clue_Query(kActorMcCoy, kCluePhoneCallDektora1) || Actor_Clue_Query(kActorMcCoy, kCluePhoneCallLucy1)) && !Game_Flag_Query(165) && Actor_Query_Goal_Number(kActorCrazylegs) != 2 && Game_Flag_Query(653) && !Game_Flag_Query(662)) {
				Game_Flag_Set(662);
				Actor_Face_Actor(kActorMcCoy, v1, true);
				Actor_Face_Actor(v1, kActorMcCoy, true);
				if (v1 == kActorDektora) {
					sub_4032DC();
				} else if (v1 == kActorLucy) {
					sub_403484();
				}
				Async_Actor_Walk_To_XYZ(v1, -175.0f, 8.0f, -617.0f, 0, false);
				Loop_Actor_Walk_To_XYZ(kActorMcCoy, -137.0f, 8.0f, -577.0f, 0, 0, false, 1);
				Game_Flag_Set(312);
				Set_Enter(41, kSceneHF05);
			}
		}
	}
	return false;
}