Exemplo n.º 1
0
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;
}
Exemplo n.º 2
0
bool SceneScriptUG10::ClickedOn2DRegion(int region) {
	float x, y, z;
	Actor_Query_XYZ(kActorMcCoy, &x, &y, &z);
	if (region == 0 && !Player_Query_Combat_Mode()) {
		if (x >= 120.0f) {
			Actor_Says(kActorMcCoy, 8525, 3);
		} else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 4.98f, 0.38f, 83.15f, 0, 1, false, 0)) {
			if (Game_Flag_Query(474)) {
				Scene_Loop_Set_Default(1);
				Scene_Loop_Start_Special(kSceneLoopModeOnce, 0, false);
				Game_Flag_Reset(474);
				Obstacle_Object("BOX01 BRIDGE", true);
				Player_Loses_Control();
			} else {
				Scene_Loop_Set_Default(4);
				Scene_Loop_Start_Special(kSceneLoopModeOnce, 3, false);
				Game_Flag_Set(474);
				Unobstacle_Object("BOX01 BRIDGE", true);
				Player_Loses_Control();
			}
		}
		return true;
	}
	return false;
}
Exemplo n.º 3
0
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);
		}
	}
}
Exemplo n.º 4
0
bool SceneScriptUG02::ClickedOnExit(int exitId) {
	if (exitId == 0) {
		if (Game_Flag_Query(498) || !sub_402354()) {
			int v2 = Player_Query_Combat_Mode();
			if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -202.0f, 120.16f, -74.0f, 0, 1, v2, 0)) {
				Actor_Face_Heading(kActorMcCoy, 270, false);
				Footstep_Sound_Override_On(2);
				Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 0, 0);
				Footstep_Sound_Override_Off();
				int v3 = Player_Query_Combat_Mode();
				Loop_Actor_Walk_To_XYZ(kActorMcCoy, -96.57f, 74.87f, -271.28f, 0, 0, v3, 0);
				int v4 = Player_Query_Combat_Mode();
				Loop_Actor_Walk_To_XYZ(kActorMcCoy, -95.0f, 74.87f, -503.0f, 0, 0, v4, 0);
				Game_Flag_Set(315);
				Set_Enter(74, kSceneUG01);
			}
		}
		return true;
	}
	if (exitId == 1) {
		if (Game_Flag_Query(498)) {
			if (sub_402354()) {
				return true;
			}
			Loop_Actor_Walk_To_XYZ(kActorMcCoy, -368.75f, 155.75f, -63.0f, 0, 0, false, 0);
			Loop_Actor_Walk_To_XYZ(kActorMcCoy, -340.75f, 155.75f, -119.0f, 0, 0, false, 0);
		}
		Loop_Actor_Walk_To_XYZ(kActorMcCoy, -304.75f, 155.75f, -171.0f, 0, 0, false, 0);
		Actor_Face_Heading(kActorMcCoy, 14, false);
		Loop_Actor_Travel_Ladder(kActorMcCoy, 9, 1, 0);
		Game_Flag_Set(318);
		Game_Flag_Reset(259);
		Game_Flag_Set(479);
		if (!Game_Flag_Query(403)) {
			Game_Flag_Set(388);
			Game_Flag_Set(403);
			Item_Remove_From_World(121);
		}
		Set_Enter(8, kSceneHC03);
		return true;
	}
	return false;
}
Exemplo n.º 5
0
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;
		}
	}
}
Exemplo n.º 6
0
bool SceneScriptPS10::ClickedOnItem(int itemId, bool a2) {
	if (Player_Query_Combat_Mode()) {
		switch (itemId) {
		case kItemPoliceMazeTarget4:
			Sound_Play(4, 50, 0, 0, 50);
			break;
		case kItemPoliceMazeTarget5:
			Sound_Play(555, 50, 0, 0, 50);
			break;
		case kItemPoliceMazeTarget7:
			Sound_Play(555, 50, 0, 0, 50);
			break;
		default:
			Sound_Play(2, 12, 0, 0, 50);
			break;
		}
		Item_Spin_In_World(itemId);
		if (itemId == kItemPoliceMazeTarget1) {
			Item_Flag_As_Non_Target(kItemPoliceMazeTarget1);
			Item_Flag_As_Non_Target(kItemPoliceMazeTarget2);
		}
		if (itemId == kItemPoliceMazeTarget2) {
			Item_Flag_As_Non_Target(kItemPoliceMazeTarget1);
			Item_Flag_As_Non_Target(kItemPoliceMazeTarget2);
		}
		if (itemId == kItemPoliceMazeTarget3) {
			Item_Flag_As_Non_Target(kItemPoliceMazeTarget3);
		}
		if (itemId == kItemPoliceMazeTarget4) {
			Item_Flag_As_Non_Target(kItemPoliceMazeTarget4);
		}
		if (itemId == kItemPoliceMazeTarget5) {
			Item_Flag_As_Non_Target(kItemPoliceMazeTarget5);
		}
		if (itemId == kItemPoliceMazeTarget6) {
			Item_Flag_As_Non_Target(kItemPoliceMazeTarget6);
		}
		if (itemId == kItemPoliceMazeTarget7) {
			Item_Flag_As_Non_Target(kItemPoliceMazeTarget7);
		}
		if (itemId == kItemPoliceMazeTarget8) {
			Item_Flag_As_Non_Target(kItemPoliceMazeTarget8);
		}
		if (itemId == kItemPoliceMazeTarget9) {
			Item_Flag_As_Non_Target(kItemPoliceMazeTarget9);
		} else {
			Item_Flag_As_Non_Target(itemId);
		}
		return true;
	}

	return false;
}
Exemplo n.º 7
0
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;
}
Exemplo n.º 8
0
bool SceneScriptPS10::ClickedOnItem(int itemId, bool combatMode) {
	if (Player_Query_Combat_Mode()) {
		switch (itemId) {
		case kItemPS10Target4:
			Sound_Play(kSfxFEMHURT2, 50, 0, 0, 50);
			break;
		case kItemPS10Target5:              // fall through
		case kItemPS10Target7:
			Sound_Play(kSfxMALEHURT, 50, 0, 0, 50);
			break;
		default:
			Sound_Play(kSfxSPINNY1,  12, 0, 0, 50);
			break;
		}

#if BLADERUNNER_ORIGINAL_BUGS
		Item_Spin_In_World(itemId);
#endif // BLADERUNNER_ORIGINAL_BUGS
		switch (itemId) {
		case kItemPS10Target1:              // fall through // treated the same as kItemPS10Target2 (In the original code they are the same target in different tracks)
		case kItemPS10Target2:
#if BLADERUNNER_ORIGINAL_BUGS
#else
			if (Item_Query_Visible(kItemPS10Target1)) { // without this check, target2 seems to get the spinning while the visible target1 stays put
				Item_Spin_In_World(kItemPS10Target1);
			} else {
				Item_Spin_In_World(kItemPS10Target2);
			}
#endif // BLADERUNNER_ORIGINAL_BUGS
			Item_Flag_As_Non_Target(kItemPS10Target1);
			Item_Flag_As_Non_Target(kItemPS10Target2);
			break;
		case kItemPS10Target3:              // fall through
		case kItemPS10Target4:              // fall through
		case kItemPS10Target5:              // fall through
		case kItemPS10Target6:              // fall through
		case kItemPS10Target7:              // fall through
		case kItemPS10Target8:              // fall through
		case kItemPS10Target9:              // fall through
		default:
#if BLADERUNNER_ORIGINAL_BUGS
#else
			Item_Spin_In_World(itemId);
#endif // BLADERUNNER_ORIGINAL_BUGS
			Item_Flag_As_Non_Target(itemId);
			break;
		}
		return true;
	}

	return false;
}
Exemplo n.º 9
0
bool ScriptDR05::ClickedOnItem(int itemId, bool a2) {
	if (itemId == 78) {
		if (Player_Query_Combat_Mode()) {
			Game_Flag_Set(271);
			Actor_Set_Goal_Number(35, 30);
		} else if (!Game_Flag_Query(272) && !Loop_Actor_Walk_To_Item(0, 78, 24, 1, true) && Actor_Query_Goal_Number(35) != 11) {
			if (!Actor_Query_Goal_Number(35)) {
				Actor_Says_With_Pause(0, 1015, 0.1f, 12);
				Actor_Says(35, 70, 13);
			}
			Actor_Set_Goal_Number(35, 30);
		}
		//return true; //bug?
	}
	if (itemId == 122 && Player_Query_Combat_Mode() && !Actor_Query_Goal_Number(35)) {
		Overlay_Play("DR05OVER", 1, 0, 1, 0);
		Item_Remove_From_World(122);
		Game_Flag_Set(270);
		Actor_Set_Goal_Number(35, 10);
		Music_Play(18, 71, 0, 0, -1, 0, 2);
		return true;
	}
	return false;
}
Exemplo n.º 10
0
bool SceneScriptDR04::ClickedOnActor(int actorId) {
	if ( actorId == kActorMoraji
	 && !Player_Query_Combat_Mode()
	) {
		if (Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiLayDown) {
			if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 109, 0, true, true)) {
				Actor_Face_Actor(kActorMcCoy, kActorMoraji, true);
				Actor_Says(kActorMcCoy, 945, 13);
				Actor_Says(kActorMoraji, 0, kAnimationModeTalk);
				Actor_Says(kActorMoraji, 10, kAnimationModeTalk);
				Actor_Says(kActorMcCoy, 950, 13);
				Actor_Says(kActorMoraji, 20, kAnimationModeTalk);
				Actor_Says(kActorMoraji, 30, kAnimationModeTalk);
				Actor_Says(kActorMcCoy, 955, 13);
				Actor_Says_With_Pause(kActorMoraji, 40, 0.0f, kAnimationModeTalk);
				Actor_Says(kActorMoraji, 50, kAnimationModeTalk);
				Actor_Clue_Acquire(kActorMcCoy, kClueMorajiInterview, true, kActorMoraji);
				Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiDie);
				Actor_Set_Goal_Number(kActorOfficerGrayford, 101); // Grayford arrives at scene of Moraji corpse
				return true;
			}
		}

		if (Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiDead) {
			if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorMoraji, 36, true, false)) {
#if BLADERUNNER_ORIGINAL_BUGS
				Actor_Set_Goal_Number(kActorOfficerGrayford, 106);
#else
				// bugfix: original code would result in this conversation repeating multiple times if:
				// Officer Grayford is at 103 goal (asking "What do you know about this?"...
				// and the player skips the conversation fast.
				// So ask about a sheet (goal 106) for Moraji only when Grayford starts patrolling (104, 105 goals)
				if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 104
				 || Actor_Query_Goal_Number(kActorOfficerGrayford) == 105
				) {
					Actor_Set_Goal_Number(kActorOfficerGrayford, 106); // This goal reverts to the previous one after finishing up
				}
#endif // BLADERUNNER_ORIGINAL_BUGS
				return true;
			}
		}
	}
	return false;
}
Exemplo n.º 11
0
bool SceneScriptUG02::sub_402354() {
	if (!Game_Flag_Query(498)) {
		int v0 = Player_Query_Combat_Mode();
		Loop_Actor_Walk_To_XYZ(kActorMcCoy, -340.75f, 155.75f, -119.0f, 0, 0, v0, 0);
		Loop_Actor_Walk_To_XYZ(kActorMcCoy, -368.75f, 155.75f, -63.0f, 0, 0, v0, 0);
		Loop_Actor_Walk_To_XYZ(kActorMcCoy, -365.0f, 155.65f, -19.0f, 0, 0, v0, 0);
		Actor_Face_Heading(kActorMcCoy, 318, false);
		Footstep_Sound_Override_On(2);
		Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 0, 0);
		Footstep_Sound_Override_Off();
		Game_Flag_Set(498);
		return false;
	}
	if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -312.75f, 120.16f, 1.01f, 0, 1, false, 0)) {
		Actor_Face_Heading(kActorMcCoy, 830, false);
		Footstep_Sound_Override_On(2);
		Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 1, 0);
		Footstep_Sound_Override_Off();
		Game_Flag_Reset(498);
		return false;
	}
	return true;
}
Exemplo n.º 12
0
bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) {
	switch (newGoalNumber) {
	case kGoalClovisDefault:
		AI_Movement_Track_Flush(kActorClovis);
		AI_Movement_Track_Append(kActorClovis, 33, 0);
		AI_Movement_Track_Repeat(kActorClovis);
		return true;

	case kGoalClovisBB11WalkToMcCoy:
		AI_Movement_Track_Flush(kActorClovis);
		AI_Movement_Track_Append(kActorClovis, 319, 0);
		AI_Movement_Track_Append(kActorClovis, 320, 0);
		AI_Movement_Track_Repeat(kActorClovis);
		return true;

	case kGoalClovisBB11StopSadik:
		Actor_Start_Speech_Sample(kActorClovis, 0);
		AI_Movement_Track_Flush(kActorClovis);
		AI_Movement_Track_Append(kActorClovis, 321, 0);
		AI_Movement_Track_Repeat(kActorClovis);
		return true;

	case kGoalClovisBB11TalkWithSadik:
		Actor_Set_Goal_Number(kActorSadik, kGoalSadikBB11TalkWithClovis);
		Actor_Says(kActorClovis, 10, 15);
		Actor_Says(kActorSadik, 0, kAnimationModeTalk);
		Actor_Face_Actor(kActorClovis, kActorSadik, true);
		Actor_Says(kActorClovis, 20, 13);
		Actor_Says(kActorClovis, 30, 12);
		Actor_Face_Actor(kActorSadik, kActorClovis, true);
		Actor_Says(kActorSadik, 10, kAnimationModeTalk);
		Actor_Says(kActorClovis, 40, 17);
		Actor_Says(kActorSadik, 20, kAnimationModeTalk);
		Actor_Face_Actor(kActorClovis, kActorMcCoy, true);
		Actor_Face_Actor(kActorSadik, kActorMcCoy, true);
		Actor_Says(kActorClovis, 50, 14);
		Actor_Change_Animation_Mode(kActorClovis, kAnimationModeSit);
		return true;

	case kGoalClovisBB11TalkToMcCoy:
		Actor_Says(kActorClovis, 60, 30);
		Actor_Says(kActorSadik, 30, kAnimationModeTalk);
		Actor_Says(kActorClovis, 70, 30);
		Actor_Says(kActorClovis, 80, 30);
		Actor_Change_Animation_Mode(kActorClovis, 29);
		Actor_Says(kActorSadik, 40, kAnimationModeTalk);
		Actor_Says(kActorSadik, 50, kAnimationModeTalk);
		Actor_Says(kActorClovis, 90, 13);
		Actor_Face_Current_Camera(5, true);
		Actor_Says(kActorClovis, 100, 17);
		Delay(1000);
		if (!Game_Flag_Query(kFlagSadikIsReplicant)) {
			Actor_Clue_Acquire(kActorMcCoy, kClueStaggeredbyPunches, true, kActorSadik);
		}
		Game_Flag_Set(kFlagNotUsed383);
		Game_Flag_Reset(kFlagBB11SadikFight);
		Global_Variable_Set(kVariableChapter, 3);
		Actor_Set_Goal_Number(kActorClovis, 200);
		Actor_Set_Goal_Number(kActorSadik, 200);
		Actor_Clue_Acquire(kActorMcCoy, kClueAct2Ended, true, -1);
		Player_Gains_Control();
		Chapter_Enter(3, kSetCT08_CT51_UG12, kSceneCT08);
		Game_Flag_Set(kFlagMcCoyTiedDown);
		Game_Flag_Set(kFlagChapter3Intro);
		return true;

	case 300:
		Actor_Put_In_Set(kActorClovis, kSetUG18);
		Actor_Set_At_XYZ(kActorClovis, -52.26f, 0.0f, 611.02f, 900);
		Actor_Change_Animation_Mode(kActorClovis, kAnimationModeIdle);
		return true;

	case 301:
	case 302:
	case 303:
	case 310:
		return true;

	case 350:
		Actor_Put_In_Set(kActorClovis, kSetFreeSlotA);
		Actor_Set_At_Waypoint(kActorClovis, 33, 0);
		return true;

	case 400:
		AI_Movement_Track_Flush(kActorClovis);
		Actor_Put_In_Set(kActorClovis, kSetFreeSlotA);
		Actor_Set_At_Waypoint(kActorClovis, 33, 0);
		return true;

	case 401:
		AI_Movement_Track_Flush(kActorClovis);
		AI_Movement_Track_Append(kActorClovis, 341, 0);
		AI_Movement_Track_Append(kActorClovis, 342, 0);
		AI_Movement_Track_Repeat(kActorClovis);
		return true;

	case 402:
		Player_Loses_Control();
		Actor_Force_Stop_Walking(kActorMcCoy);
		Actor_Face_Actor(kActorMcCoy, kActorClovis, 1);
		Loop_Actor_Walk_To_Actor(kActorClovis, kActorMcCoy, 48, 0, 1);
		Actor_Face_Actor(kActorClovis, kActorMcCoy, 1);
		Actor_Change_Animation_Mode(kActorClovis, 6);
		if (Player_Query_Combat_Mode()) {
			Actor_Change_Animation_Mode(kActorMcCoy, 49);
		} else {
			Actor_Change_Animation_Mode(kActorMcCoy, 48);
		}
		Delay(3000);
		Actor_Retired_Here(kActorMcCoy, 12, 48, 1, kActorClovis);
		return true;

	case 500:
		Actor_Set_Goal_Number(kActorClovis, 510);
		return true;

	case 510:
		if (Game_Flag_Query(653)) {
			Actor_Set_Goal_Number(kActorClovis, 513);
		} else {
			Actor_Set_Goal_Number(kActorClovis, 511);
			Game_Flag_Set(685);
		}
		return true;

	case 511:
		Actor_Put_In_Set(kActorClovis, kSetKP05_KP06);
		Actor_Set_At_XYZ(kActorClovis, -1072.0f, 8.26f, -708.0f, 530);
		return true;

	case 512:
		Actor_Says(kActorClovis, 110, kAnimationModeTalk);
		Actor_Says(kActorMcCoy, 2255, kAnimationModeTalk);
		Actor_Says(kActorClovis, 120, kAnimationModeTalk);
		Actor_Says(kActorClovis, 130, kAnimationModeTalk);
		Actor_Says(kActorClovis, 140, kAnimationModeTalk);
		Actor_Says(kActorMcCoy, 2260, kAnimationModeTalk);
		Actor_Says(kActorClovis, 150, kAnimationModeTalk);
		Actor_Set_Goal_Number(kActorClovis, 513);
		return true;

	case 513:
		Actor_Put_In_Set(kActorClovis, kSetKP07);
		Actor_Set_Targetable(kActorClovis, true);
		if (Game_Flag_Query(653)) {
			Global_Variable_Set(kVariableReplicants, 0);
			Global_Variable_Increment(kVariableReplicants, 1);
			Actor_Set_At_XYZ(kActorClovis, 45.0f, -41.52f, -85.0f, 750);
		} else {
			Actor_Set_At_XYZ(kActorClovis, 84.85f, -50.56f, -68.87f, 800);
			Actor_Face_Heading(kActorClovis, 1022, false);
		}
		someAnim();
		return true;

	case 514:
		Actor_Says(kActorMcCoy, 2345, 16);
		Actor_Says(kActorClovis, 170, -1);
		Actor_Says(kActorClovis, 180, kAnimationModeTalk);
		Actor_Says(kActorMcCoy, 2350, 17);
		if (!Game_Flag_Query(714)) {
			Actor_Says(kActorMcCoy, 2355, 11);
		}
		Actor_Says(kActorClovis, 190, -1);
		Actor_Says(kActorClovis, 200, kAnimationModeTalk);
		Actor_Says(kActorMcCoy, 2360, 18);
		Actor_Says(kActorClovis, 210, kAnimationModeTalk);
		Actor_Says(kActorClovis, 220, -1);
		Actor_Set_Goal_Number(kActorClovis, 515);
		return true;

	case 515:
		ADQ_Add(kActorClovis, 240, -1);
		ADQ_Add(kActorClovis, 250, -1);
		ADQ_Add(kActorClovis, 260, -1);
		ADQ_Add(kActorClovis, 270, -1);
		ADQ_Add_Pause(1000);
		ADQ_Add(kActorClovis, 280, -1);
		ADQ_Add(kActorClovis, 290, -1);
		ADQ_Add(kActorClovis, 300, -1);
		return true;

	case 516:
		Actor_Says(kActorMcCoy, 8501, kAnimationModeTalk);
		Actor_Says(kActorClovis, 1260, kAnimationModeTalk);
		Actor_Says(kActorMcCoy, 8502, kAnimationModeTalk);
		Actor_Says(kActorClovis, 1270, kAnimationModeTalk);
		Actor_Says(kActorMcCoy, 8504, kAnimationModeTalk);
		Actor_Says(kActorClovis, 1290, kAnimationModeTalk);
		Actor_Says(kActorMcCoy, 8505, kAnimationModeTalk);
		Actor_Says(kActorClovis, 1300, kAnimationModeTalk);
		Actor_Says(kActorClovis, 1310, kAnimationModeTalk);
		Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
		Ambient_Sounds_Remove_All_Looping_Sounds(1);
		Outtake_Play(kOuttakeEnd4A, 0, -1);
		if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy
		 && Game_Flag_Query(kFlagLucyIsReplicant)
		) {
			Outtake_Play(kOuttakeEnd4B, 0, -1);
		} else if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsDektora
		       && Game_Flag_Query(kFlagDektoraIsReplicant)
		) {
			Outtake_Play(kOuttakeEnd4C, 0, -1);
		}
		Outtake_Play(kOuttakeEnd4D, 0, -1);
		Game_Over();
		return true;

	case 517:
		if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorLucy, kSetKP07)) {
			Actor_Set_Goal_Number(kActorLucy, 599);
			Global_Variable_Decrement(kVariableReplicants, 1);
		}
		if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorLuther, kSetKP07)) {
			Actor_Set_Goal_Number(kActorLuther, 599);
			Global_Variable_Decrement(kVariableReplicants, 1);
		}
		if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorDektora, kSetKP07)) {
			Non_Player_Actor_Combat_Mode_On(kActorDektora, kActorCombatStateIdle, false, kActorMcCoy, 19, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 10, 300, false);
		}
		if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorZuben, kSetKP07)) {
			Non_Player_Actor_Combat_Mode_On(kActorZuben, kActorCombatStateIdle, false, kActorMcCoy, 19, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 10, 300, false);
		}
		if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorSadik, kSetKP07)) {
			Non_Player_Actor_Combat_Mode_On(kActorSadik, kActorCombatStateIdle, true, kActorMcCoy, 19, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 10, 300, false);
		}
		if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorIzo, kSetKP07)) {
			Non_Player_Actor_Combat_Mode_On(kActorIzo, kActorCombatStateIdle, false, kActorMcCoy, 19, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 10, 300, false);
		}
		if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorGordo, kSetKP07)) {
			Non_Player_Actor_Combat_Mode_On(kActorGordo, kActorCombatStateIdle, true, kActorMcCoy, 19, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 10, 300, false);
		}
		if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorClovis, kSetKP07)) {
			Non_Player_Actor_Combat_Mode_On(kActorClovis, kActorCombatStateIdle, false, kActorMcCoy, 19, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 10, 300, false);
		}
		return true;

	case 518:
		Actor_Set_At_XYZ(kActorClovis, 84.85f, -50.56f, -68.87f, 800);
		Actor_Face_Heading(kActorClovis, 1022, false);
		Actor_Set_Targetable(kActorClovis, true);
		Game_Flag_Set(685);
		someAnim();
		return true;

	default:
		break;
	}
	return false;
}
Exemplo n.º 13
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;
}
Exemplo n.º 14
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;
}
Exemplo n.º 15
0
bool ScriptNR11::ClickedOn3DObject(const char *objectName, bool a2) {

	if (Object_Query_Click("CLOTHING02", objectName) || Object_Query_Click("BOX27", objectName) || Object_Query_Click("BOX39", objectName) || Object_Query_Click("BOX44", objectName) || Object_Query_Click("DRESS", objectName) || Object_Query_Click("COATRACK", objectName) || Object_Query_Click("COLUMN3 DETS", objectName) || Object_Query_Click("COLUMN PIPE01", objectName) || Object_Query_Click("RECTANGLE02", objectName) || Object_Query_Click("COLUMN04", objectName) || Object_Query_Click("COATRACK01", objectName) || Object_Query_Click("SHIRT", objectName) || Object_Query_Click("SKIRT 02", objectName) || Object_Query_Click("CLOTHING B 03", objectName) || Object_Query_Click("BUST BUST", objectName)) {
		if (a2) {
			Actor_Set_Goal_Number(1, 211);
			Scene_Exits_Disable();
			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);
		} else if (Actor_Query_Goal_Number(3) == 250) {
			if (!Loop_Actor_Walk_To_XYZ(0, 24.0f, 0.33f, 0.0f, 0, 1, false, 0)) {
				Actor_Face_XYZ(0, -180.0f, 0.0f, -170.0f, true);
				sub_4028EC();
				Actor_Set_Goal_Number(1, 211);
				if (Actor_Query_Friendliness_To_Other(3, 0) < 30) {
					Actor_Set_At_XYZ(3, 0.5f, 0.33f, -162.0f, 0);
					Loop_Actor_Walk_To_XYZ(3, -24.0f, 0.33f, -35.4f, 0, 0, true, 0);
					Actor_Face_Actor(0, 3, true);
					Actor_Change_Animation_Mode(3, 71);
					Delay(500);
					Actor_Change_Animation_Mode(0, 48);
					Delay(2000);
					Actor_Set_Goal_Number(0, 231);
				} else {
					Actor_Says(0, 3840, 18);
					Delay(1000);
					if (Actor_Query_Friendliness_To_Other(3, 0) > 59 && !Global_Variable_Query(45)) {
						Music_Play(21, 35, 0, 3, -1, 0, 0);
					}
					Loop_Actor_Walk_To_XYZ(3, -135.0f, 0.33000001f, -267.0f, 0, 0, false, 0);
					Actor_Face_Actor(3, 0, true);
					Actor_Face_Actor(0, 3, true);
					Actor_Clue_Acquire(0, 107, 1, 3);
					Actor_Says(3, 990, 13);
					Actor_Says(3, 1000, 14);
					Loop_Actor_Walk_To_Actor(3, 0, 108, 0, false);
					Actor_Says(0, 3845, 13);
					Actor_Says(0, 3850, 15);
					Actor_Says(3, 1010, 14);
					Actor_Says(0, 3855, 13);
					Actor_Says(3, 1020, 12);
					Actor_Says(0, 3860, 12);
					Actor_Says_With_Pause(3, 1030, 1.0f, 14);
					Actor_Says(3, 1040, 13);
					Actor_Says(0, 3865, 15);
					Actor_Says_With_Pause(3, 1050, 0.80000001f, 14);
					Actor_Says(3, 1060, 13);
					Actor_Says(0, 3870, 3);
					Actor_Says(3, 1070, 14);
					Actor_Modify_Friendliness_To_Other(3, 0, 5);
					if (Actor_Query_Friendliness_To_Other(3, 0) > 55 && !Global_Variable_Query(45)) {
						Global_Variable_Set(45, 2);
						Actor_Says(3, 1130, 17);
						Actor_Says(0, 6365, 12);
						Actor_Says(3, 1140, 14);
						Actor_Says(0, 6370, 14);
						Actor_Says(3, 1150, 12);
						Actor_Says(3, 1160, 16);
					}
					Actor_Says(3, 1080, 13);
					Actor_Says(0, 3875, 14);
					Actor_Says(3, 1090, 17);
					Music_Stop(4);
					Actor_Set_Goal_Number(3, 260);
					if (Global_Variable_Query(40) == 1) {
						Actor_Set_Goal_Number(1, 236);
					}
					Game_Flag_Set(591);
				}
			} else {
				if (Random_Query(1, 2) == 1) {
					Actor_Says(0, 8575, 14);
				} else {
					Actor_Says(0, 8580, 14);
				}
			}
		}
		return true;
	}
	return false;
}