Beispiel #1
0
bool SceneScriptBB07::ClickedOnExit(int exitId) {
	if (exitId == 0) {
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -615.0f, 252.59f, -1018.0f, 0, 1, false, 0)) {
			Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
			Ambient_Sounds_Remove_All_Looping_Sounds(1);
			Overlay_Remove("BB07OVER");
			Game_Flag_Set(300);
			Set_Enter(22, 6);
		}
		return true;
	}
	if (exitId == 1) {
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -619.0f, 252.59f, -1136.0f, 0, 1, false, 0)) {
			Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
			Ambient_Sounds_Remove_All_Looping_Sounds(1);
			Overlay_Remove("BB07OVER");
			Game_Flag_Set(364);
			Set_Enter(102, 120);
		}
		return true;
	}
	if (exitId == 2) {
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -551.0f, 252.59f, -1004.0f, 0, 1, false, 0)) {
			Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
			Ambient_Sounds_Remove_All_Looping_Sounds(1);
			Overlay_Remove("BB07OVER");
			Game_Flag_Set(362);
			Set_Enter(2, 7);
		}
		return true;
	}
	return false;
}
Beispiel #2
0
bool SceneScriptMA02::ClickedOn3DObject(const char *objectName, bool a2) {
	if (Object_Query_Click("E-ESPER", objectName)) {
		Actor_Face_Object(kActorMcCoy, "E-ESPER", true);
		Delay(1000);
		ESPER_Flag_To_Activate();
		return true;
	}
	if (Object_Query_Click("BAR-MAIN", objectName) && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, -29.0f, -140.4f, 298.0f, 36, 1, false, 0)) {
		Actor_Face_Object(kActorMcCoy, "BAR-MAIN", true);
		if (Global_Variable_Query(1) < 4) {
			Actor_Set_Goal_Number(kActorMaggie, 3);
		} else if (Global_Variable_Query(1) == 5 && Game_Flag_Query(653) && !Actor_Clue_Query(kActorMcCoy, kClueCrystalsCigarette)) {
			Overlay_Remove("MA02OVER");
			Item_Pickup_Spin_Effect(985, 480, 240);
			Actor_Voice_Over(1150, kActorVoiceOver);
			Actor_Voice_Over(1160, kActorVoiceOver);
			Actor_Voice_Over(1170, kActorVoiceOver);
			Actor_Voice_Over(1180, kActorVoiceOver);
			Actor_Voice_Over(1190, kActorVoiceOver);
			Actor_Voice_Over(1200, kActorVoiceOver);
			Actor_Clue_Acquire(kActorMcCoy, kClueCrystalsCigarette, 1, -1);
		} else {
			Actor_Says(kActorMcCoy, 8526, 0);
		}
		return true;
	}
	return false;
}
Beispiel #3
0
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);
	}
}
Beispiel #4
0
bool ScriptMA04::ClickedOnExit(int exitId) {
	if (exitId == 0) {
		if (!Loop_Actor_Walk_To_XYZ(0, -7099.0f, 954.0f, 1866.0f, 0, 1, false, 0)) {
			Game_Flag_Set(36);
			Set_Enter(10, 49);
		}
		return true;
	}
	if (exitId == 1) {
		float x, y, z;
		Actor_Query_XYZ(0, &x, &y, &z);
		if (z <= 1677.0f || !Loop_Actor_Walk_To_XYZ(0, -7199.0f, 955.0f, 1675.0f, 0, 1, false, 0)) {
			if (sub_402888()) {
				Overlay_Remove("MA04OVER");
			}
			Loop_Actor_Walk_To_XYZ(0, -7199.0f, 955.0f, 1675.0f, 0, 0, false, 1);
			Game_Flag_Set(62);
			if (Global_Variable_Query(1) != 2 && Global_Variable_Query(1) != 3) {
				Async_Actor_Walk_To_XYZ(0, -7199.0f, 956.17f, 1568.0f, 0, false);
			}
			Set_Enter(51, 51);
		}
		return true;
	}
	if (exitId == 2) {
		if (!Loop_Actor_Walk_To_XYZ(0, -7115.0f, 954.0f, 1742.0f, 0, 1, false, 0)) {
			int sounds[] = {252, 405, 404, 407, 406};
			Ambient_Sounds_Play_Sound(sounds[Random_Query(0, 4)], 50, 0, 0, 0);
			Delay(3000);
			Loop_Actor_Walk_To_XYZ(0, -7139.0f, 954.0f, 1746.0f, 0, 1, false, 1);
		}
	}
	return false;
}
Beispiel #5
0
void SceneScriptNR04::PlayerWalkedIn() {
	Loop_Actor_Walk_To_XYZ(kActorMcCoy, 53.0f, 0.0f, -26.0f, 0, 0, false, 0);
	if (Game_Flag_Query(374)) {
		Overlay_Play("nr04over", 0, 1, 0, 0);
		Delay(4000);
		Overlay_Remove("nr04over");
	}
	//return false;
}
Beispiel #6
0
bool SceneScriptCT05::ClickedOnExit(int exitId) {
	if (exitId == 0) {
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -128.42f, -109.91f, 112.83f, 0, true, false, false)) {
			Game_Flag_Set(kFlagCT05toCT12);
			if (Actor_Query_Goal_Number(kActorGaff) == kGoalGaffCT12WaitForMcCoy) {
				Overlay_Remove("ct05over");
			}
			Set_Enter(kSetCT01_CT12, kSceneCT12);
		}
		return true;
	}

	if (exitId == 1) {
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -308.18f, -109.91f, 674.77f, 0, true, false, false)) {
			Game_Flag_Set(kFlagCT05toCT04);
			if (Actor_Query_Goal_Number(kActorGaff) == kGoalGaffCT12WaitForMcCoy) {
				Overlay_Remove("ct05over");
				Actor_Set_Goal_Number(kActorGaff, kGoalGaffCT12Leave);
				Game_Flag_Set(kFlagMA01GaffApproachMcCoy);
			}
			Set_Enter(kSetCT03_CT04, kSceneCT04);
		}
		return true;
	}

	if (exitId == 2) {
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 71.99f, -109.91f, 288.79f, 0, true, false, false)) {
			Footstep_Sound_Override_On(2);
			Actor_Face_Object(kActorMcCoy, "STAIR 2", true);
			Loop_Actor_Travel_Stairs(kActorMcCoy, 9, true, kAnimationModeIdle);
			Actor_Set_At_XYZ(kActorMcCoy, 99.73f, -19.91f, 134.97f, 256);
			Loop_Actor_Travel_Stairs(kActorMcCoy, 5, true, kAnimationModeIdle);
			Footstep_Sound_Override_Off();
			Game_Flag_Set(kFlagCT05toCT06);
			if (Actor_Query_Goal_Number(kActorGaff) == kGoalGaffCT12WaitForMcCoy) {
				Overlay_Remove("ct05over");
			}
			Set_Enter(kSetCT06, kSceneCT06);
		}
		return true;
	}
	return false;
}
Beispiel #7
0
void ScriptMA04::DialogueQueueFlushed(int a1) {
	Overlay_Remove("MA04OVR2");
}
Beispiel #8
0
void ScriptMA04::PlayerWalkedIn() {
	if (Game_Flag_Query(647)) {
		Player_Gains_Control();
	}
	if (sub_402820() || sub_402758()) {
		Overlay_Play("MA04OVER", 0, 1, 0, 0);
	}
	if (Game_Flag_Query(647)) {
		Loop_Actor_Walk_To_XYZ(0, -7139.0f, 954.0f, 1746.0f, 0, 1, false, 0);
	} else if (Game_Flag_Query(35)) {
		Loop_Actor_Walk_To_XYZ(0, -7143.0f, 954.0f, 1868.0f, 0, 1, false, 0);
	}
	Game_Flag_Reset(35);
	Game_Flag_Reset(63);
	Game_Flag_Reset(647);
	if (Game_Flag_Query(61)) {
		if (Global_Variable_Query(1) == 2 && !Actor_Clue_Query(0, 43)) {
			Sound_Play(403, 100, 0, 0, 50);
			Loop_Actor_Walk_To_XYZ(0, -7176.0f, 954.0f, 1806.0f, 0, 0, false, 0);
			Actor_Face_Heading(0, 256, true);
			Actor_Says(0, 2680, 0);
			Sound_Play(123, 100, 0, 0, 50);
			Delay(500);
			Actor_Says(4, 0, 3);
			Actor_Says(0, 2685, 13);
			Actor_Says(4, 10, 3);
			Actor_Says(0, 2690, 17);
			Actor_Says(4, 30, 3);
			Actor_Says(0, 2695, 12);
			Actor_Says(4, 40, 3);
			Actor_Says(4, 50, 3);
			Actor_Says(0, 2700, 3);
			Actor_Says(4, 60, 3);
			Actor_Says(4, 70, 3);
			Sound_Play(123, 100, 0, 0, 50);
			Actor_Clue_Acquire(0, 43, 1, 4);
			Spinner_Set_Selectable_Destination_Flag(5, 1);
			Game_Flag_Set(186);
			if (!Game_Flag_Query(163)) {
				Game_Flag_Set(163);
				Item_Remove_From_World(66);
			}
			Actor_Set_Goal_Number(23, 99);
			Actor_Put_In_Set(23, 93);
			Actor_Set_At_Waypoint(23, 35, 0);
			Autosave_Game(0);
		}
		//return false;
		return;
	}
	if ((Game_Flag_Query(40) || Game_Flag_Query(41)) && !Game_Flag_Query(146)) {
		Music_Play(2, 52, 0, 2, -1, 0, 0);
		Player_Loses_Control();
		Loop_Actor_Walk_To_XYZ(0, -7199.0f, 955.0f, 1677.0f, 0, 1, false, 0);
		if (sub_402820() || sub_402758()) {
			Overlay_Remove("MA04OVER");
		}
		Loop_Actor_Walk_To_XYZ(0, -7199.0f, 955.0f, 1675.0f, 0, 1, false, 0);
		Game_Flag_Set(146);
		Async_Actor_Walk_To_XYZ(0, -7204.0f, 956.17f, 1568.0f, 0, false);
		Set_Enter(51, 51);
	}
}
Beispiel #9
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;
}
Beispiel #10
0
void ScriptNR11::SceneFrameAdvanced(int frame) {
	if (frame == 62) {
		Ambient_Sounds_Play_Sound(449, 40, 100, 100, 10);
	}
	if (frame == 67) {
		Ambient_Sounds_Play_Sound(449, 30, 90, 90, 10);
	}
	if (frame == 74) {
		Ambient_Sounds_Play_Sound(450, 50, 83, 83, 10);
	}
	if (frame == 80) {
		Ambient_Sounds_Play_Sound(449, 60, 65, 65, 10);
	}
	if (frame == 92) {
		Ambient_Sounds_Play_Sound(450, 30, 50, 50, 10);
	}
	if (frame == 97) {
		Ambient_Sounds_Play_Sound(449, 50, -40, -40, 10);
	}
	if (frame == 103) {
		Ambient_Sounds_Play_Sound(450, 40, -27, -27, 10);
	}
	if (frame == 109) {
		Ambient_Sounds_Play_Sound(449, 60, -20, -20, 10);
	}
	if (frame == 62) {
		Ambient_Sounds_Play_Sound(122, 80, 100, 100, 15);
	}
	if (Game_Flag_Query(659)) {
		Game_Flag_Reset(659);
		Overlay_Remove("NR11OVER");
		Overlay_Play("NR11OVER", 1, 0, 1, 0);
	}
	if (Game_Flag_Query(635)) {
		sub_4028EC();
		Player_Loses_Control();
		if (!Player_Query_Combat_Mode()) {
			Player_Set_Combat_Mode(true);
		}
		Actor_Set_Goal_Number(0, 230);
		Scene_Loop_Set_Default(3);
		Scene_Loop_Start_Special(2, 2, 1);
		Game_Flag_Reset(635);
	} else {
		if (frame < 61 || frame > 120) {
			//return false;
			return;
		}
		sub_4027D0(0, frame);
		if (Actor_Query_Goal_Number(1) == 215) {
			sub_4027D0(1, frame);
		}
		if (frame == 120) {
			Actor_Set_Goal_Number(0, 0);
			Player_Gains_Control();
			if (Actor_Query_Goal_Number(1) == 215) {
				Actor_Set_Goal_Number(1, 216);
			}
			Actor_Set_Goal_Number(3, 269);
		}
	}
	//return true;
}