示例#1
0
void SceneScriptTB05::SceneFrameAdvanced(int frame) {
	if (frame == 61) {
		Sound_Play(150, Random_Query(52, 52), 0, 0, 50);
	}
	if (frame == 63) {
		Sound_Play(283, Random_Query(55, 55), 0, 0, 50);
	}
	//return true;
}
示例#2
0
void SceneScriptDR03::SceneFrameAdvanced(int frame) {
	if (frame == 1 || frame == 4 || frame == 8 || frame == 10 || frame == 19 || frame == 21 || frame == 22 || frame == 23 || frame == 30 || frame == 31 || frame == 32 || frame == 33 || frame == 46 || frame == 49) {
		if (Random_Query(0, 1)) {
			Sound_Play(97, Random_Query(20, 33), 80, 80, 50);
		} else {
			Sound_Play(59, Random_Query(5, 6), 80, 80, 50);
		}
	}
}
示例#3
0
void SceneScriptHF04::SceneFrameAdvanced(int frame) {
	if (frame == 62) {
		Sound_Play(kSfxSTONDOR1, Random_Query(43, 43), 0, 0, 50);
	}

	if (frame == 154) {
		Sound_Play(kSfxSTONDOR2, Random_Query(43, 43), 0, 0, 50);
	}

	if (frame == 179
	 && Actor_Query_Goal_Number(kActorLucy) == kGoalLucyHF04WaitForMcCoy1
	) {
		Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04Run3);
	}

	if (Game_Flag_Query(kFlagHF04CloseDoors)) {
		Game_Flag_Reset(kFlagHF04CloseDoors);
		Scene_Loop_Set_Default(kHF04LoopMainDoorsClosed);
		Scene_Loop_Start_Special(kSceneLoopModeOnce, kHF04LoopDoorsClosing, true);
		//return true;
		return;
	}

	if (Game_Flag_Query(kFlagHF04OpenDoors)) {
		Game_Flag_Reset(kFlagHF04OpenDoors);
		Scene_Loop_Set_Default(kHF04LoopMainLoop);
		Scene_Loop_Start_Special(kSceneLoopModeOnce, kHF04LoopDoorsOpening, true);
		return; // true;
	}

	if (frame == 89) {
		Game_Flag_Set(kFlagHF04DoorsClosed);
		Obstacle_Object("HIDE_WALL_A", false);
		Obstacle_Object("HIDE_WALL_B", false);
		Unobstacle_Object("PIVOT_WALL#1", false);
		Unobstacle_Object("PIVOT_WALL#02", false);
		Unobstacle_Object("PIVOT_WALL#03", true);
		return; // true;
	}

	if (frame == 180) {
		Unobstacle_Object("HIDE_WALL_A", false);
		Unobstacle_Object("HIDE_WALL_B", false);
		Obstacle_Object("PIVOT_WALL#1", false);
		Obstacle_Object("PIVOT_WALL#02", false);
		Obstacle_Object("PIVOT_WALL#03", true);
		Game_Flag_Reset(kFlagHF04DoorsClosed);
		if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyHF04Run2) {
			Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04WaitForMcCoy1);
		}
		return; // true;
	}
	//return false;
}
示例#4
0
文件: hc03.cpp 项目: 86400/scummvm
void ScriptHC03::SceneFrameAdvanced(int frame) {
	if (frame == 10 || frame == 19 || frame == 29 || frame == 39 || frame == 49 || frame == 59 || frame == 71 || frame == 82 || frame == 91 || frame == 101 || frame == 111 || frame == 121 || frame == 131) {
		Sound_Play(281, Random_Query(33, 50), 50, 50, 50);
	}
	if (!Game_Flag_Query(521) && frame == 66) {
		Ambient_Sounds_Play_Sound(328, 90, 0, -40, 99);
		Sound_Play(201, Random_Query(47, 47), 0, -40, 50);
		Scene_Exit_Add_2D_Exit(1, 400, 275, 515, 375, 2);
		Game_Flag_Set(521);
	}
}
示例#5
0
void SceneScriptDR03::PlayerWalkedIn() {
	if (!Game_Flag_Query(kFlagDR02toDR03)) {
		if (Random_Query(1, 2) == 1) {
			Actor_Says(kActorChew, 660, 14);
			Actor_Says(kActorChew, 680, 14);
		} else if (Random_Query(1, 2) == 2) {
			Actor_Says(kActorChew, 670, 14);
			Actor_Says(kActorChew, 620, 14);
		} else {
			Actor_Says(kActorChew, 690, 14);
			Actor_Says(kActorChew, 710, 14);
		}
	}
}
示例#6
0
文件: ma04.cpp 项目: 86400/scummvm
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;
}
示例#7
0
void SceneScriptCT12::SceneFrameAdvanced(int frame) {
	if (!((frame - 1) % 10)) {
		/*int v2 = Random_Query(0, 1);
		if (v2 <= 1)
		{
			if (v2)
			{
				v1 = 60;
			}
			else
			{
				v1 = 59;
			}
		}*/
		Sound_Play(/*v1*/Random_Query(59, 60), 10, -80, -80, 50);
	}
	if (frame == 160) {
		Actor_Change_Animation_Mode(kActorGaff, 41);
	}
	if (frame == 152) {
		Sound_Play(116, 100, 40, 0, 50);
	}
	if (frame == 203) {
		Sound_Play(119, 100, 40, 0, 50);
	}
	if (frame == 212) {
		Sound_Play(117, 40, 0, 0, 50);
	}
	if (frame == 269) {
		Player_Gains_Control();
		Player_Set_Combat_Mode(false);
		Actor_Set_Invisible(kActorGaff, false);
	}
}
示例#8
0
文件: ug15.cpp 项目: athrxx/scummvm
void SceneScriptUG15::InitializeScene() {
	if (Game_Flag_Query(kFlagUG17toUG15)) {
		Setup_Scene_Information( -25.0f, 26.31f, -434.0f, 520);
	} else if (Game_Flag_Query(kFlagUG16toUG15a)) {
		Setup_Scene_Information( -17.0f, 26.31f, -346.0f, 711);
	} else if (Game_Flag_Query(kFlagUG16toUG15b)) {
		Setup_Scene_Information( -18.0f, 48.07f,   62.0f, 650);
	} else {
		Setup_Scene_Information(-238.0f, 48.07f,  222.0f, 180);
		if (Game_Flag_Query(kFlagUG15RatShot)
		 && Random_Query(1, 10) == 10
		) {
			Game_Flag_Reset(kFlagUG15RatShot);
		}
	}

	if (Game_Flag_Query(kFlagUG15BridgeBroken)) {
		Scene_Loop_Set_Default(kUG15LoopMainLoopBridgeBroken);
	}

	if (Game_Flag_Query(kFlagUG17toUG15)
	 || Game_Flag_Query(kFlagUG16toUG15a)
	) {
		Scene_Exit_Add_2D_Exit(0, 260,   0, 307, 298, 0);
		Scene_Exit_Add_2D_Exit(1, 301, 147, 337, 304, 1);
		Game_Flag_Reset(kFlagUG17toUG15);
		Game_Flag_Reset(kFlagUG16toUG15a);
	} else {
		Scene_Exit_Add_2D_Exit(2, 406, 128, 480, 316, 1);
		Scene_Exit_Add_2D_Exit(3,   0,   0,  30, 479, 3);
	}

	Ambient_Sounds_Add_Looping_Sound(105, 71, 0, 1);
	Ambient_Sounds_Add_Looping_Sound( 95, 45, 0, 1);
	Ambient_Sounds_Add_Looping_Sound(332, 76, 0, 1);
	Ambient_Sounds_Add_Sound(291, 2,  20, 25, 33, -100, 100, -100,  100, 0, 0);
	Ambient_Sounds_Add_Sound(292, 2,  20, 25, 33, -100, 100, -100,  100, 0, 0);
	Ambient_Sounds_Add_Sound(293, 2,  20, 25, 33, -100, 100, -100,  100, 0, 0);
	Ambient_Sounds_Add_Sound(294, 2,  20, 25, 33, -100, 100, -100,  100, 0, 0);
	Ambient_Sounds_Add_Sound(295, 2,  20, 25, 33, -100, 100, -100,  100, 0, 0);
	Ambient_Sounds_Add_Sound(401, 2, 120, 11, 12, -100, 100, -100,  100, 0, 0);
	Ambient_Sounds_Add_Sound(402, 2, 120, 11, 12, -100, 100, -100,  100, 0, 0);
	Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100,  100, 0, 0);
	Ambient_Sounds_Add_Sound(397, 2, 120, 11, 12, -100, 100, -100,  100, 0, 0);
	Ambient_Sounds_Add_Sound(398, 2, 120, 11, 12, -100, 100, -100,  100, 0, 0);
	Ambient_Sounds_Add_Sound(303, 5,  50, 47, 57, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(304, 5,  50, 47, 57, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(305, 5,  50, 47, 57, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(  1, 5,  50, 47, 57, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound( 57, 5,  50, 17, 37, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound( 58, 5,  50, 17, 37, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(306, 5,  50, 27, 37, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(307, 5,  50, 27, 37, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(308, 5,  50, 27, 37, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(196, 5,  50, 27, 37, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(197, 5,  50, 27, 37, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(198, 5,  50, 27, 37, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(199, 5,  50, 27, 37, -100, 100, -101, -101, 0, 0);
}
示例#9
0
void AIScriptFreeSlotB::ClickedByPlayer() {
	if (Actor_Query_Goal_Number(kActorFreeSlotB) != 599)
		return; //false;

	Actor_Face_Actor(kActorMcCoy, kActorFreeSlotB, 1);
	if (Random_Query(1, 2) == 1) {
		Actor_Says(kActorMcCoy, 8655, 16);
	} else {
		Actor_Says(kActorMcCoy, 8665, 16);
	}
}
示例#10
0
文件: dr05.cpp 项目: 86400/scummvm
void ScriptDR05::SceneFrameAdvanced(int frame) {
	if (frame == 49) {
		Sound_Play(148, Random_Query(50, 50), 80, 80, 50);
	}
	if (Game_Flag_Query(271)) {
		Item_Remove_From_World(78);
		Game_Flag_Reset(271);
		Game_Flag_Set(272);
		Actor_Set_Goal_Number(35, 30);
	}
}
示例#11
0
bool AIScriptGenericWalkerA::prepareWalker() {
	if (Game_Flag_Query(kFlagGenericWalkerWaiting) || Global_Variable_Query(35) < 0 || !preparePath()) {
		return false;
	}

	int model = 0;
	do {
		if (isInside) {
			model = Random_Query(3, 5);
		} else {
			model = Random_Query(0, 5);
		}
	} while (model == Global_Variable_Query(kVariableGenericWalkerBModel) || model == Global_Variable_Query(kVariableGenericWalkerCModel));

	Global_Variable_Set(kVariableGenericWalkerAModel, model);
	Game_Flag_Set(kFlagGenericWalkerWaiting);
	AI_Countdown_Timer_Reset(kActorGenwalkerA, 2);
	AI_Countdown_Timer_Start(kActorGenwalkerA, 2, Random_Query(4, 12));
	Actor_Set_Goal_Number(kActorGenwalkerA, 1);
	return true;
}
示例#12
0
void AIScriptGenericWalkerC::CompletedMovementTrack() {
	if (Actor_Query_Goal_Number(kActorGenwalkerC) > 0) {
		Actor_Set_Goal_Number(kActorGenwalkerC, 0);
		if (!Game_Flag_Query(kFlagGenericWalkerWaiting)) {
			Game_Flag_Set(kFlagGenericWalkerWaiting);
			AI_Countdown_Timer_Reset(kActorGenwalkerC, 2);
			AI_Countdown_Timer_Start(kActorGenwalkerC, 2, Random_Query(6, 10));
		}
		// return true;
	}
	// return false;
}
示例#13
0
void AIScriptClovis::shotAnim() {
	if ((unsigned int)(_animationState - 13) > 3) {
		if ((unsigned int)(_animationState - 32) <= 8) {
			_animationState = 40;
			_animationFrame = 0;
		} else {
			if (Random_Query(0, 1)) {
				_animationState = 20;
			} else {
				_animationState = 19;
			}
			_animationFrame = 0;
		}
	} else {
		if (Random_Query(0, 1)) {
			_animationState = 18;
		} else {
			_animationState = 17;
		}
		_animationFrame = 0;
	}
}
示例#14
0
bool AIScriptGenericWalkerC::prepareWalker() {
	if (Game_Flag_Query(kFlagGenericWalkerWaiting) || Global_Variable_Query(35) < 2 || !preparePath()) {
		return false;
	}

	int model = 0;
	do {
		if (isInside) {
			model = Random_Query(3, 5);
		} else {
			model = Random_Query(0, 5);
		}
	// Here is probably bug in original code, because it not using kVariableGenericWalkerBModel but kVariableGenericWalkerCModel
	} while (model == Global_Variable_Query(kVariableGenericWalkerAModel) || model == Global_Variable_Query(kVariableGenericWalkerBModel));


	Global_Variable_Set(kVariableGenericWalkerCModel, model);
	Game_Flag_Set(kFlagGenericWalkerWaiting);
	AI_Countdown_Timer_Reset(kActorGenwalkerC, 2);
	AI_Countdown_Timer_Start(kActorGenwalkerC, 2, Random_Query(4, 12));
	Actor_Set_Goal_Number(kActorGenwalkerC, 1);
	return true;
}
示例#15
0
void AIScriptGaff::ClickedByPlayer() {
	if ((Global_Variable_Query(kVariableChapter) == 2
	  || Global_Variable_Query(kVariableChapter) == 3
	 )
	 && Game_Flag_Query(kFlagGaffChapter2Started)
	) {
		AI_Movement_Track_Pause(kActorGaff);
		Actor_Face_Actor(kActorMcCoy, kActorGaff, true);
		Actor_Face_Actor(kActorGaff, kActorMcCoy, true);
		if (Random_Query(1, 3) == 1) {
			Actor_Says(kActorMcCoy, 3970, 14);
			Actor_Says(kActorGaff, 100, 13);
		} else if (Random_Query(1, 3) == 2) {
			Actor_Says(kActorMcCoy, 3970, 14);
			Actor_Says(kActorGaff, 110, 13);
		} else {
			Actor_Says(kActorMcCoy, 3970, 14);
			Actor_Says(kActorGaff, 180, 13);
		}
		AI_Movement_Track_Unpause(kActorGaff);
		// return true;
	}
	// return false;
}
示例#16
0
void SceneScriptBB01::SceneFrameAdvanced(int frame) {
	if (frame == 193) {
		Sound_Play(118, 40, 0, 0, 50);
	}
	if (frame == 241 || frame == 363) {
		Sound_Play(116, 100, -50, -50, 50);
	}
	if (frame == 286 || frame == 407) {
		Sound_Play(119, 100, -50, -50, 50);
	}
	if (frame == 433) {
		Sound_Play(117, 40, -50, 80, 50);
	}
	if (frame == 120) {
		Sound_Play(286, Random_Query(33, 33), 100, -100, 50);
	}
}
示例#17
0
文件: hc02.cpp 项目: athrxx/scummvm
void SceneScriptHC02::SceneFrameAdvanced(int frame) {
	if (frame == 70) {
		Sound_Play(73, 11, 50, -90, 50);
	}

	if (frame == 58) {
		Sound_Play(73, 11, 50, -90, 50);
	}

	if (frame == 69
	 || frame == 77
	 || frame == 86
	 || frame == 95
	 || frame == 104
	 || frame == 113
	 || frame == 119
	) {
		Sound_Play(60, Random_Query(6, 7), -20, 20, 50);
	}
}
示例#18
0
文件: ct01.cpp 项目: athrxx/scummvm
void SceneScriptCT01::SceneFrameAdvanced(int frame) {
	if ((frame < 316
	  || frame > 435
	 )
	 && ((frame - 1) % 10) == 0
	) {
		Ambient_Sounds_Play_Sound(Random_Query(59, 60), 25, 30, 30, 0);
	}

	if (frame == 23) {
		Ambient_Sounds_Play_Sound(118, 40, 99, 0, 0);
	}

	if (frame == 316) {
		Ambient_Sounds_Play_Sound(373, 50, -50, 100, 99);
	}

	if (frame == 196
	 || frame == 452
	) {
		int v3 = Random_Query(0, 6);
		if (v3 == 0) {
			Overlay_Play("ct01spnr", 0, false, true, 0);
			if (Random_Query(0, 1)) {
				Ambient_Sounds_Play_Sound(68, Random_Query(33, 50), 0, 0, 0);
			} else {
				Ambient_Sounds_Play_Sound(67, Random_Query(33, 50), 0, 0, 0);
			}
		} else if (v3 == 1) {
			Overlay_Play("ct01spnr", 1, false, true, 0);
			if (Random_Query(0, 1)) {
				Ambient_Sounds_Play_Sound(69, Random_Query(33, 50), 0, 0, 0);
			} else {
				Ambient_Sounds_Play_Sound(66, Random_Query(33, 50), 0, 0, 0);
			}
		}
	}
}
示例#19
0
void AIScriptGenericWalkerA::ClickedByPlayer() {
	Actor_Face_Actor(kActorMcCoy, kActorGenwalkerA, true);
	if (Actor_Query_Goal_Number(kActorGenwalkerA) == 200) {
		Actor_Says(kActorMcCoy, 5290, 18);
	} else {
		switch (Random_Query(1, 10)) {
		case 1:
			Actor_Says(kActorMcCoy, 365, 3);
			break;
		case 2:
			Actor_Says(kActorMcCoy, 755, 3);
			break;
		case 3:
			Actor_Says(kActorMcCoy, 940, 3);
			break;
		case 4:
			Actor_Says(kActorMcCoy, 4560, 3);
			break;
		case 5:
			Actor_Says(kActorMcCoy, 4870, 3);
			break;
		case 6:
			Actor_Says(kActorMcCoy, 5125, 3);
			break;
		case 7:
			Actor_Says(kActorMcCoy, 8450, 3);
			break;
		case 8:
			Actor_Says(kActorMcCoy, 1085, 3);
			break;
		case 9:
			Actor_Says(kActorMcCoy, 365, 3);
			break;
		case 10:
			Actor_Says(kActorMcCoy, 7415, 3);
			break;
		}
	}
	//return false;
}
示例#20
0
void SceneScriptMA02::sub_402044() {
	// int v0;
	// int v1;
	// int v3[7];

	// v0 = 0;

	int i = 0;
	int arr[7];
	if (Global_Variable_Query(1) < 4 && Game_Flag_Query(45)) {
		// v0 = 1;
		// v3[0] = 0;
		arr[i++] = 0;
	}

	// v1 = v0 + 1;
	// v3[v0] = 1;
	arr[i++] = 1;
	if (Global_Variable_Query(1) >= 3) {
		// v3[v1] = 2;
		// v1 = v0 + 2;
		arr[i++] = 2;
	}
	if (Global_Variable_Query(1) >= 2 && Global_Variable_Query(1) <= 4) {
		// v3[v1++] = 3;
		arr[i++] = 3;
	}
	if (Game_Flag_Query(171) && Game_Flag_Query(170)) {
		// v3[v1++] = 4;
		arr[i++] = 4;
	}
	//if (v1 <= 0) {
	if (i == 0) {
		Global_Variable_Set(52, -1);
	} else {
		// Global_Variable_Set(52, v3[Random_Query(0, v1 - 1)]);
		Global_Variable_Set(52, arr[Random_Query(0, i - 1)]);
	}
}
示例#21
0
void AIScriptGenericWalkerC::ClickedByPlayer() {
	Actor_Face_Actor(kActorMcCoy, kActorGenwalkerC, true);
	switch (Random_Query(1, 10)) {
	case 1:
		Actor_Says(kActorMcCoy, 365, 3);
		break;
	case 2:
		Actor_Says(kActorMcCoy, 755, 3);
		break;
	case 3:
		Actor_Says(kActorMcCoy, 940, 3);
		break;
	case 4:
		Actor_Says(kActorMcCoy, 4560, 3);
		break;
	case 5:
		Actor_Says(kActorMcCoy, 4870, 3);
		break;
	case 6:
		Actor_Says(kActorMcCoy, 5125, 3);
		break;
	case 7:
		Actor_Says(kActorMcCoy, 8450, 3);
		break;
	case 8:
		Actor_Says(kActorMcCoy, 1085, 3);
		break;
	case 9:
		Actor_Says(kActorMcCoy, 365, 3);
		break;
	case 10:
		Actor_Says(kActorMcCoy, 7415, 3);
		break;
	}
	//return false;
}
示例#22
0
void SceneScriptCT05::SceneFrameAdvanced(int frame) {
	if (frame == 7
	 || frame == 15
	 || frame == 29
	) {
		switch (Random_Query(0, 4)) {
		case 4:
			Sound_Play(kSfxDRIPPY10, Random_Query(25, 50), -70, -70, 50);
			break;
		case 3:
			Sound_Play(kSfxDRIPPY7, Random_Query(25, 50), -70, -70, 50);
			break;
		case 2:
			Sound_Play(kSfxDRIPPY6, Random_Query(25, 50), -70, -70, 50);
			break;
		case 1:
			Sound_Play(kSfxDRIPPY2, Random_Query(25, 50), -70, -70, 50);
			break;
		case 0:
			Sound_Play(kSfxDRIPPY1, Random_Query(25, 50), -70, -70, 50);
			break;
		}
	}
}
示例#23
0
bool AIScriptClovis::UpdateAnimation(int *animation, int *frame) {
	bool flag;

	switch (_animationState) {
	case 0:
		if (_var1 == 1) {
			*animation = 227;
			if (_var2) {
				_var2--;
			} else if (++_animationFrame == 7) {
				_var2 = Random_Query(5, 15);
			} else {
				if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(227)) {
					_animationFrame = 0;
					_var1 = 0;
				}
			}
		} else if (_var1 == 0) {
			*animation = 228;
			if (_var2) {
				_animationFrame += _var3;
				if (_animationFrame > _var5) {
					_animationFrame = _var5;
					_var3 = -1;
				} else {
					if (_animationFrame < _var4) {
						_animationFrame = _var4;
						_var3 = 1;
					}
				}
				_var2--;
			} else {
				_animationFrame += _var3;
				if (_animationFrame == 13 && Random_Query(0, 1)) {
					_var3 = -1;
					_var4 = 9;
					_var5 = 13;
					_var2 = Random_Query(4, 15);
				} else {
					if (_animationFrame == 6) {
						if (Random_Query(0, 1)) {
							_var3 = -1;
							_var4 = 3;
							_var5 = 6;
							_var2 = Random_Query(4, 15);
						}
					}
				}
				if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(228)) {
					_animationFrame = 0;
				} else {
					if (_animationFrame < 0) {
						_animationFrame = Slice_Animation_Query_Number_Of_Frames(228) - 1;
					}
				}
				if (!_animationFrame) {
					if (Random_Query(0, 1) > 0) {
						_var1 = 1;
					} else {
						if (Random_Query(0, 2) > 0) {
							_var3 = 1;
							_var4 = 0;
							_var5 = 0;
							_var2 = Random_Query(5, 15);
						}
					}
				}
			}
		}
		break;

	case 1:
		if (_var1 == 0) {
			*animation = 228;
		}
		if (_var1 == 1) {
			*animation = 227;
		}
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
			_animationFrame += 3;
			if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
				_animationFrame = 0;
				*animation = _animationNext;
				_animationState = _animationStateNext;
			}
		} else {
			_animationFrame -= 3;
			if (_animationFrame <= 0) {
				_animationFrame = 0;
				*animation = _animationNext;
				_animationState = _animationStateNext;
			}
		}
		break;

	case 2:
		*animation = 238;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(238)) {
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(238) - 1;
			}
		}
		break;

	case 3:
		*animation = 239;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(239)) {
			flag = true;
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(239) - 1;
				flag = true;
			} else {
				flag = false;
			}
		}
		if (flag) {
			_animationState = 2;
			_animationFrame = 0;
			*animation = 238;
			if (Actor_Query_Goal_Number(kActorClovis) == kGoalClovisBB11TalkWithSadik) {
				Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11PrepareToTalkToMcCoy);
			}
		}
		break;

	case 4:
		*animation = 240;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(240)) {
			flag = true;
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(240) - 1;
				flag = true;
			} else {
				flag = false;
			}
		}
		if (flag) {
			*animation = 227;
			_animationState = 0;
			Actor_Change_Animation_Mode(kActorClovis, 0);
		}
		break;

	case 5:
		*animation = 230;
		if (!_animationFrame && _flag) {
			_animationState = 0;
		} else {
			_animationFrame++;
			if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(230)) {
				_animationFrame = 0;
			}
		}
		break;

	case 6:
		*animation = 231;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(231)) {
			_animationFrame = 0;
			_animationState = 5;
			*animation = 230;
		}
		break;

	case 7:
		*animation = 232;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(232)) {
			_animationFrame = 0;
			_animationState = 5;
			*animation = 230;
		}
		break;

	case 8:
		*animation = 233;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(233)) {
			_animationFrame = 0;
			_animationState = 5;
			*animation = 230;
		}
		break;

	case 9:
		*animation = 234;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(234)) {
			_animationFrame = 0;
			_animationState = 5;
			*animation = 230;
		}
		break;

	case 10:
		*animation = 235;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(235)) {
			_animationFrame = 0;
			_animationState = 5;
			*animation = 230;
		}
		break;

	case 11:
		*animation = 236;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(236)) {
			_animationFrame = 0;
			_animationState = 5;
			*animation = 230;
		}
		break;

	case 12:
		*animation = 241;
		if (!_animationFrame && _flag) {
			_animationState = 2;
			_animationFrame = 0;
			Actor_Change_Animation_Mode(kActorClovis, kAnimationModeSit);
		} else {
			_animationFrame++;
			if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(241)) {
				_animationFrame = 0;
			}
		}
		break;

	case 13:
		*animation = 208;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(208)) {
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(208) - 1;
			}
		}
		break;

	case 14:
		*animation = 217;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(217)) {
			flag = true;
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(217) - 1;
				flag = true;
			} else {
				flag = false;
			}
		}
		if (flag) {
			*animation = 208;
			_animationState = 13;
		}
		break;

	case 15:
		*animation = 218;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(218)) {
			flag = true;
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(218) - 1;
				flag = true;
			} else {
				flag = false;
			}
		}
		if (flag) {
			*animation = 227;
			_animationState = 0;
		}
		break;

	case 16:
		*animation = 219;
		_animationFrame++;
		if (_animationFrame == 2) {
			int snd;

			if (Random_Query(1, 2) == 1) {
				snd = 9010;
			} else {
				snd = 9015;
			}
			Sound_Play_Speech_Line(5, snd, 75, 0, 99);
		}
		if (_animationFrame == 4) {
			Actor_Combat_AI_Hit_Attempt(5);
		}
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
			flag = true;
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(*animation) - 1;
				flag = true;
			} else {
				flag = false;
			}
		}
		if (flag) {
			_animationState = 13;
			*animation = 208;
			Actor_Change_Animation_Mode(kActorClovis, 4);
		}
		break;

	case 17:
		*animation = 211;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(211)) {
			flag = true;
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(211) - 1;
				flag = true;
			} else {
				flag = false;
			}
		}
		if (flag) {
			_animationState = 13;
			*animation = 208;
			Actor_Change_Animation_Mode(kActorClovis, 4);
		}
		break;

	case 18:
		*animation = 212;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(212)) {
			flag = true;
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(212) - 1;
				flag = true;
			} else {
				flag = false;
			}
		}
		if (flag) {
			_animationState = 13;
			*animation = 208;
			Actor_Change_Animation_Mode(kActorClovis, 4);
		}
		break;

	case 19:
		*animation = 224;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(224)) {
			flag = true;
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(224) - 1;
				flag = true;
			} else {
				flag = false;
			}
		}
		if (flag) {
			*animation = 227;
			_animationState = 0;
			Actor_Change_Animation_Mode(kActorClovis, 0);
		}
		break;

	case 20:
		*animation = 225;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(225)) {
			flag = true;
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(225) - 1;
				flag = true;
			} else {
				flag = false;
			}
		}
		if (flag) {
			*animation = 227;
			_animationState = 0;
			Actor_Change_Animation_Mode(kActorClovis, 0);
		}
		break;

	case 21:
		*animation = 220;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(220)) {
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(220) - 1;
			}
		}
		break;

	case 22:
		*animation = 221;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(221)) {
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(221) - 1;
			}
		}
		break;

	case 23:
		*animation = 213;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(213)) {
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(213) - 1;
			}
		}
		break;

	case 24:
		*animation = 217;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(217)) {
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(217) - 1;
			}
		}
		break;

	case 25:
		*animation = 222;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(222)) {
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(222) - 1;
			}
		}
		break;

	case 26:
		*animation = 223;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(223)) {
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(223) - 1;
			}
		}
		break;

	case 27:
		*animation = 215;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(215)) {
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(215) - 1;
			}
		}
		break;

	case 28:
		*animation = 216;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(216)) {
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(216) - 1;
			}
		}
		break;

	case 29:
		*animation = 209;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(209)) {
			flag = true;
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(209) - 1;
				flag = true;
			} else {
				flag = false;
			}
		}
		if (flag) {
			_animationState = 13;
			*animation = 208;
			Actor_Change_Animation_Mode(kActorClovis, 4);
		}
		break;

	case 30:
		*animation = 210;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(210)) {
			flag = 1;
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(210) - 1;
				flag = 1;
			} else {
				flag = 0;
			}
		}
		if (flag) {
			_animationState = 13;
			*animation = 208;
			Actor_Change_Animation_Mode(kActorClovis, 4);
		}
		break;

	case 31:
		*animation = 242;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(242)) {
			flag = 1;
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(242) - 1;
				flag = 1;
			} else {
				flag = 0;
			}
		}
		if (flag) {
			*animation = 227;
			_animationState = 0;
			Actor_Change_Animation_Mode(kActorClovis, 0);
		}
		break;

	case 32:
		*animation = 243;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(243)) {
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(243) - 1;
			}
		}
		break;

	case 33:
		*animation = 244;
		if (!_animationFrame && _flag) {
			_animationState = 32;
			_animationFrame = 0;
			Actor_Change_Animation_Mode(kActorClovis, 54);
		} else {
			_animationFrame++;
			if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(244)) {
				_animationFrame = 0;
			} else {
				if (_animationFrame < 0) {
					_animationFrame = Slice_Animation_Query_Number_Of_Frames(244) - 1;
				}
			}
		}
		break;

	case 34:
		*animation = 245;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(245)) {
			_animationState = 33;
			_animationFrame = 0;
			*animation = 244;
			Actor_Change_Animation_Mode(kActorClovis, 54);
		}
		break;

	case 35:
		_animationFrame++;
		*animation = 247;
		Actor_Change_Animation_Mode(kActorClovis, 54);
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(247)) {
			_animationFrame = 0;
			_animationState = 33;
			*animation = 244;
		}
		break;

	case 36:
		*animation = 248;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(248)) {
			_animationFrame = 0;
			_animationState = 37;
			*animation = 249;
		}
		break;

	case 37:
		*animation = 249;
		if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(249) - 1) {
			_animationFrame++;
		}
		break;

	case 38:
		*animation = 250;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(250)) {
			_animationFrame = 0;
			_animationState = 39;
			*animation = 251;
		}
		break;

	case 39:
		*animation = 251;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(251)) {
			_animationFrame = 0;
		} else {
			if (_animationFrame < 0) {
				_animationFrame = Slice_Animation_Query_Number_Of_Frames(251) - 1;
			}
		}
		break;

	case 40:
		*animation = 252;
		if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(252) - 1) {
			_animationFrame++;
		}
		break;

	case 41:
		*animation = 226;
		_animationFrame++;
		if (_animationFrame == Slice_Animation_Query_Number_Of_Frames(226) - 1) {
			Actor_Change_Animation_Mode(kActorClovis, 88);
			_animationState = 42;
			_animationFrame = Slice_Animation_Query_Number_Of_Frames(226) - 1;
		}
		break;

	case 42:
		*animation = 226;
		_animationFrame = Slice_Animation_Query_Number_Of_Frames(226) - 1;
		break;

	default:
		break;
	}
	*frame = _animationFrame;

	return true;
}
示例#24
0
bool AIScriptClovis::ChangeAnimationMode(int mode) {
	switch (mode) {
	case kAnimationModeIdle:
		if (!Game_Flag_Query(685)) {
			switch (_animationState) {
			case 2:
				Actor_Change_Animation_Mode(kActorClovis, kAnimationModeSit);
				break;
			case 4:
				break;
			case 5:
			case 6:
			case 7:
			case 8:
			case 9:
			case 10:
			case 11:
				_flag = 1;
				break;
			case 12:
				_flag = 1;
				break;
			case 13:
				_animationState = 15;
				_animationFrame = 0;
				break;
			default:
				_animationState = 0;
				_animationFrame = 0;
				_var1 = 0;
				break;
			}
			break;
		}
		_animationState = 32;
		_animationFrame = 0;
		break;

	case kAnimationModeWalk:
		_animationState = 21;
		_animationFrame = 0;
		break;

	case kAnimationModeRun:
		_animationState = 22;
		_animationFrame = 0;
		break;

	case kAnimationModeTalk:
	case 9:
		if (Game_Flag_Query(685)) {
			_animationFrame = 0;
			_animationState = 34;
		} else {
			if (_animationState < 5 || _animationState > 11) {
				_animationState = 1;
				_animationStateNext = 5;
				_animationNext = 230;
				_flag = 0;
			}
		}
		break;

	case kAnimationModeCombatIdle:
		switch (_animationState) {
		case 13:
		case 14:
			break;
		case 23:
		case 24:
		case 27:
		case 28:
			_animationState = 13;
			_animationFrame = 0;
			break;
		default:
			_animationState = 1;
			_animationStateNext = 14;
			_animationNext = 217;
			break;
		}
		break;

	case kAnimationModeCombatAttack:
		_animationState = 16;
		_animationFrame = 0;
		break;

	case kAnimationModeCombatWalk:
		_animationState = 21;
		_animationFrame = 0;
		break;

	case kAnimationModeCombatRun:
		_animationState = 22;
		_animationFrame = 0;
		break;

	case 10:
	case 12:
		if (_animationState < 5 || _animationState > 11) {
			_animationState = 1;
			_animationStateNext = 6;
			_animationNext = 231;
			_flag = 0;
		}
		break;

	case 11:
	case 14:
		if (_animationState < 5 || _animationState > 11) {
			_animationState = 1;
			_animationStateNext = 8;
			_animationNext = 233;
			_flag = 0;
		}
		break;

	case 13:
		if (_animationState < 5 || _animationState > 11) {
			_animationState = 1;
			_animationStateNext = 7;
			_animationNext = 232;
			_flag = 0;
		}
		break;

	case 15:
		if (_animationState < 5 || _animationState > 11) {
			_animationState = 1;
			_animationStateNext = 9;
			_animationNext = 234;
			_flag = 0;
		}
		break;

	case 16:
		if (_animationState < 5 || _animationState > 11) {
			_animationState = 1;
			_animationStateNext = 10;
			_animationNext = 235;
			_flag = 0;
		}
		break;

	case 17:
		if (_animationState < 5 || _animationState > 11) {
			_animationState = 1;
			_animationStateNext = 11;
			_animationNext = 236;
			_flag = 0;
		}
		break;

	case 20:
		_animationState = 31;
		_animationFrame = 0;
		break;

	case kAnimationModeHit:
		if ((unsigned int)(_animationState - 13) > 3) {
			if ((unsigned int)(_animationState - 32) > 8) {
				if (Random_Query(0, 1)) {
					_animationState = 20;
				} else {
					_animationState = 19;
				}
				_animationFrame = 0;
			} else {
				_animationState = 40;
				_animationFrame = 0;
			}
		} else {
			if (Random_Query(0, 1)) {
				_animationState = 18;
			} else {
				_animationState = 17;
			}
			_animationFrame = 0;
		}
		break;

	case kAnimationModeCombatHit:
		if (Random_Query(0, 1)) {
			_animationState = 17;
		} else {
			_animationState = 18;
		}
		_animationFrame = 0;
		break;

	case 29:
		_animationState = 4;
		_animationFrame = 0;
		break;

	case 30:
		_animationState = 12;
		_animationFrame = 0;
		_flag = 0;
		break;

	case 88:
		_animationState = 42;
		_animationFrame = Slice_Animation_Query_Number_Of_Frames(226) - 1;
		break;

	case kAnimationModeDie:
		_animationState = 41;
		_animationFrame = 0;
		break;

	case kAnimationModeSit:
		switch (_animationState) {
		case 4:
		case 5:
		case 6:
		case 7:
		case 8:
		case 9:
		case 10:
		case 11:
			_animationState = 3;
			_animationFrame = 0;
			break;
		default:
			break;
		}
		break;

	case 54:
		_animationFrame = 0;
		_animationState = 32;
		break;
	}

	return true;
}
示例#25
0
void SceneScriptHF03::sub_401C80() {
	Dialogue_Menu_Clear_List();
	DM_Add_To_List_Never_Repeat_Once_Selected(840, -1, 3, 8);
	DM_Add_To_List_Never_Repeat_Once_Selected(850, 6, 5, 2);
	DM_Add_To_List_Never_Repeat_Once_Selected(860, 8, -1, -1);
	DM_Add_To_List_Never_Repeat_Once_Selected(870, 2, 8, 6);
	Dialogue_Menu_Add_DONE_To_List(880);
	Dialogue_Menu_Appear(320, 240);
	int answer = Dialogue_Menu_Query_Input();
	Dialogue_Menu_Disappear();
	switch (answer) {
	case 840:
		Actor_Says(kActorMcCoy, 1630, 15);
		if (Global_Variable_Query(40) == 3) {
			Actor_Set_Goal_Number(kActorLucy, 214);
		} else if (Game_Flag_Query(46)) {
			Actor_Set_Goal_Number(kActorLucy, 212);
		} else {
			Actor_Set_Goal_Number(kActorLucy, 210);
			Game_Flag_Set(593);
		}
		break;
	case 850:
		Actor_Says(kActorMcCoy, 1635, 15);
		Actor_Says(kActorLucy, 200, 13);
		Actor_Modify_Friendliness_To_Other(kActorLucy, kActorMcCoy, 3);
		break;
	case 860:
		Actor_Says(kActorMcCoy, 1640, 12);
		if (Global_Variable_Query(40) == 3) {
			Actor_Set_Goal_Number(kActorLucy, 214);
		} else {
			Actor_Says(kActorLucy, 210, 13);
			Actor_Says(kActorMcCoy, 1655, 15);
			Actor_Modify_Friendliness_To_Other(kActorLucy, kActorMcCoy, Random_Query(9, 10));
			if (Actor_Query_Friendliness_To_Other(kActorLucy, kActorMcCoy) > 59 && !Global_Variable_Query(45)) {
				Global_Variable_Set(45, 3);
				Actor_Says(kActorLucy, 940, 14);
				Actor_Says(kActorMcCoy, 6780, 11);
				Actor_Says(kActorLucy, 950, 12);
				Actor_Says(kActorLucy, 960, 13);
				Actor_Says(kActorMcCoy, 6785, 15);
				Actor_Says(kActorLucy, 970, 16);
				Actor_Says(kActorLucy, 980, 17);
				if (Game_Flag_Query(47)) {
					Actor_Says(kActorLucy, 990, 17);
				}
				Actor_Says(kActorMcCoy, 6790, 15);
				Actor_Says(kActorLucy, 1000, 13);
				Actor_Says(kActorLucy, 1010, 17);
				Actor_Says(kActorLucy, 1020, 18);
				Actor_Says(kActorMcCoy, 6795, 14);
				Actor_Says(kActorLucy, 1030, 17);
				Actor_Says(kActorMcCoy, 6800, 14);
			}
			Actor_Says(kActorLucy, 220, 13);
			Actor_Says(kActorMcCoy, 1660, 15);
			Actor_Says(kActorLucy, 230, 14);
			Actor_Clue_Acquire(kActorLucy, kClueMcCoyHelpedLucy, 1, kActorMcCoy);
			if (Game_Flag_Query(46)) {
				Actor_Set_Goal_Number(kActorLucy, 212);
			} else {
				Actor_Set_Goal_Number(kActorLucy, 210);
			}
		}
		break;
	case 870:
		Actor_Says(kActorMcCoy, 1645, 18);
		Actor_Says(kActorLucy, 240, 14);
		Actor_Says(kActorLucy, 250, 12);
		Actor_Says(kActorLucy, 260, 13);
		Actor_Says(kActorLucy, 270, 19);
		Actor_Says(kActorMcCoy, 1665, 18);
		Actor_Says(kActorLucy, 280, 13);
		Actor_Says(kActorMcCoy, 1670, 12);
		Actor_Says(kActorLucy, 290, 14);
		Actor_Says(kActorLucy, 300, 16);
		Actor_Says(kActorMcCoy, 1675, 12);
		Actor_Says(kActorLucy, 310, 13);
		Actor_Clue_Acquire(kActorMcCoy, kClueLucyInterview, 0, kActorLucy);
		break;
	case 880:
		Actor_Says(kActorMcCoy, 1650, 14);
		break;
	}
}
示例#26
0
文件: bryant.cpp 项目: athrxx/scummvm
bool AIScriptBryant::GoalChanged(int currentGoalNumber, int newGoalNumber) {
	switch (newGoalNumber) {
	case 101:
		AI_Movement_Track_Flush(kActorBryant);

		switch (Random_Query(0, 9)) {
		case 0:
			AI_Movement_Track_Append(kActorBryant, 134, 0);
			AI_Movement_Track_Append(kActorBryant, 135, 0);
			AI_Movement_Track_Append(kActorBryant, 136, 0);
			AI_Movement_Track_Append(kActorBryant, 137, 0);
			AI_Movement_Track_Append(kActorBryant, 138, 0);
			AI_Movement_Track_Append(kActorBryant, 139, 0);
			AI_Movement_Track_Repeat(kActorBryant);
			break;
		case 1:
			AI_Movement_Track_Append(kActorBryant, 139, 0);
			AI_Movement_Track_Append(kActorBryant, 138, 0);
			AI_Movement_Track_Append(kActorBryant, 137, 0);
			AI_Movement_Track_Append(kActorBryant, 136, 0);
			AI_Movement_Track_Append(kActorBryant, 135, 0);
			AI_Movement_Track_Append(kActorBryant, 134, 0);
			AI_Movement_Track_Repeat(kActorBryant);
			break;
		case 2:
			AI_Movement_Track_Append(kActorBryant, 196, 0);
			AI_Movement_Track_Append(kActorBryant, 197, 0);
			AI_Movement_Track_Append(kActorBryant, 198, 0);
			AI_Movement_Track_Repeat(kActorBryant);
			break;
		case 3:
			AI_Movement_Track_Append(kActorBryant, 198, 0);
			AI_Movement_Track_Append(kActorBryant, 197, 0);
			AI_Movement_Track_Append(kActorBryant, 196, 0);
			AI_Movement_Track_Repeat(kActorBryant);
			break;
		case 4:
			AI_Movement_Track_Append(kActorBryant, 326, 0);
			AI_Movement_Track_Append(kActorBryant, 332, 0);
			AI_Movement_Track_Append(kActorBryant, 327, 0);
			AI_Movement_Track_Repeat(kActorBryant);
			break;
		case 5:
			AI_Movement_Track_Append(kActorBryant, 327, 0);
			AI_Movement_Track_Append(kActorBryant, 332, 0);
			AI_Movement_Track_Append(kActorBryant, 326, 0);
			AI_Movement_Track_Repeat(kActorBryant);
			break;
		case 6:
			AI_Movement_Track_Append(kActorBryant, 329, 0);
			AI_Movement_Track_Append(kActorBryant, 328, 0);
			AI_Movement_Track_Append(kActorBryant, 330, 0);
			AI_Movement_Track_Repeat(kActorBryant);
			break;
		case 7:
			AI_Movement_Track_Append(kActorBryant, 330, 0);
			AI_Movement_Track_Append(kActorBryant, 328, 0);
			AI_Movement_Track_Append(kActorBryant, 329, 0);
			AI_Movement_Track_Repeat(kActorBryant);
			break;
		case 8:
			AI_Movement_Track_Append(kActorBryant, 331, 0);
			AI_Movement_Track_Append(kActorBryant, 333, 0);
			AI_Movement_Track_Append(kActorBryant, 335, 0);
			AI_Movement_Track_Repeat(kActorBryant);
			break;
		case 9:
			AI_Movement_Track_Append(kActorBryant, 335, 0);
			AI_Movement_Track_Append(kActorBryant, 333, 0);
			AI_Movement_Track_Append(kActorBryant, 331, 0);
			AI_Movement_Track_Repeat(kActorBryant);
			break;
		}
		// fallthrough
	case 102:
		AI_Movement_Track_Append(kActorBryant, 39, 0);
		AI_Movement_Track_Repeat(kActorBryant);
		break;
	}

	return false;
}
示例#27
0
bool AIScriptFreeSlotB::UpdateAnimation(int *animation, int *frame) {
	switch (_animationState) {
	case 0:
		*animation = 861;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(861)) {
			_animationFrame = 0;
		}
		break;

	case 1:
		*animation = 862;
		if (_var1) {
			_var1--;
		} else {
			_animationFrame += _var2;
			if (_animationFrame < 8) {
				_var2 = 1;
			} else {
				if (_animationFrame > 8) {
					_var2 = -1;
				} else if (Random_Query(0, 4)) {
					_var2 = -_var2;
				}
			}
			if (_animationFrame >= 7 && _animationFrame <= 9) {
				_var1 = Random_Query(0, 1);
			}
		}
		break;

	case 2:
		*animation = 862;
		_animationFrame++;
		if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(862) - 1) {
			*animation = 861;
			_animationFrame = 0;
			_animationState = 0;
		}
		break;

	case 3:
		*animation = 858;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(858)) {
			_animationFrame = 0;
		}
		break;

	case 4:
		*animation = 857;
		_animationFrame++;
		if (_animationFrame == 3) {
			int snd;
			if (Random_Query(1, 2) == 1) {
				snd = 9010;
			} else {
				snd = 9015;
			}
			Sound_Play_Speech_Line(kActorFreeSlotB, snd, 75, 0, 99);
		}
		if (_animationFrame == 3) {
			Actor_Combat_AI_Hit_Attempt(kActorFreeSlotB);
		}
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
			*animation = 861;
			_animationFrame = 0;
			_animationState = 0;
		}
		break;

	case 5:
		*animation = 874;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(874) - 1) {
			_animationState = 8;
			_animationFrame = Slice_Animation_Query_Number_Of_Frames(874) - 1;
		}
		break;

	case 6:
		if (_animationFrame == 1) {
			Ambient_Sounds_Play_Sound(437, 99, 0, 0, 20);
		}
		*animation = 860;
		_animationFrame++;
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(860)) {
			_animationFrame = 0;
			_animationState = 0;
			Actor_Change_Animation_Mode(kActorFreeSlotB, 0);
		}
		break;

	case 7:
		*animation = 859;
		_animationFrame++;
		if (_animationFrame == 1) {
			Ambient_Sounds_Play_Sound(439, 99, 0, 0, 25);
		}
		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(859)) {
			_animationFrame = Slice_Animation_Query_Number_Of_Frames(859);
		}
		_animationState = 8;
		break;

	case 8:
		*animation = 859;
		_animationFrame = Slice_Animation_Query_Number_Of_Frames(859) - 1;
		break;

	default:
		break;
	}
	*frame = _animationFrame;
	return true;
}
示例#28
0
bool AIScriptGenericWalkerC::preparePath() {
	AI_Movement_Track_Flush(kActorGenwalkerC);
	int set = Player_Query_Current_Set();

	if (set == kSetAR01_AR02) {
		isInside = false;
		int waypointStart = Random_Query(155, 158);
		int waypointEnd = 0;
		AI_Movement_Track_Append(kActorGenwalkerC, waypointStart, 0);
		do {
			waypointEnd = Random_Query(155, 158);
		} while (waypointEnd == waypointStart);
		if ((waypointStart == 155 || waypointStart == 156) && (waypointEnd == 157 || waypointEnd == 158)) {
			AI_Movement_Track_Append(kActorGenwalkerC, 159, 0);
			AI_Movement_Track_Append(kActorGenwalkerC, 160, 0);
			if (Random_Query(0, 3) == 0) {
				AI_Movement_Track_Append_With_Facing(kActorGenwalkerC, 161, Random_Query(15, 30), 904);
			}
		} else if ((waypointEnd == 155 || waypointEnd == 156) && (waypointStart == 157 || waypointStart == 158)) {
			if (Random_Query(0, 3) == 0) {
				AI_Movement_Track_Append_With_Facing(kActorGenwalkerC, 161, Random_Query(15, 30), 904);
			}
			AI_Movement_Track_Append(kActorGenwalkerC, 160, 0);
			AI_Movement_Track_Append(kActorGenwalkerC, 159, 0);
		} else if ((waypointStart == 155 && waypointEnd == 156) || (waypointStart == 156 && waypointEnd == 155)) {
			AI_Movement_Track_Append(kActorGenwalkerC, 159, 0);
		}
		AI_Movement_Track_Append(kActorGenwalkerC, waypointEnd, 0);
		AI_Movement_Track_Repeat(kActorGenwalkerC);
		return true;
	}

	if (set == kSetCT01_CT12) {
		isInside = false;
		if (Random_Query(0, 1)) {
			AI_Movement_Track_Append(kActorGenwalkerC, 54, 1);
			if (Random_Query(1, 3) == 1) {
				AI_Movement_Track_Append(kActorGenwalkerC, 56, 0);
				AI_Movement_Track_Append(kActorGenwalkerC, 43, 1);
			} else {
				AI_Movement_Track_Append(kActorGenwalkerC, 53, 1);
			}
			AI_Movement_Track_Append(kActorGenwalkerC, 40, 1);
			AI_Movement_Track_Repeat(kActorGenwalkerC);
		} else {
			AI_Movement_Track_Append(kActorGenwalkerC, 53, 1);
			if (Random_Query(1, 3) == 1) {
				AI_Movement_Track_Append(kActorGenwalkerC, 43, 1);
			} else {
				AI_Movement_Track_Append(kActorGenwalkerC, 54, 1);
			}
			AI_Movement_Track_Append(kActorGenwalkerC, 40, 1);
			AI_Movement_Track_Repeat(kActorGenwalkerC);
		}
		return true;
	}

	if (set == kSetHC01_HC02_HC03_HC04) {
		isInside = true;
		if (Random_Query(0, 1)) {
			AI_Movement_Track_Append(kActorGenwalkerC, 164, 0);
			if (Random_Query(0, 1)) {
				AI_Movement_Track_Append(kActorGenwalkerC, 163, 0);
				AI_Movement_Track_Append(kActorGenwalkerC, 162, 0);
			} else if (Random_Query(0, 1)) {
				AI_Movement_Track_Append(kActorGenwalkerC, 163, 0);
				AI_Movement_Track_Append(kActorGenwalkerC, 162, 0);
			} else {
				AI_Movement_Track_Append(kActorGenwalkerC, 163, 0);
				AI_Movement_Track_Append(kActorGenwalkerC, 162, 0);
			}
		} else {
			AI_Movement_Track_Append(kActorGenwalkerC, 162, 0);
			if (Random_Query(0, 1)) {
				AI_Movement_Track_Append(kActorGenwalkerC, 163, 0);
				AI_Movement_Track_Append(kActorGenwalkerC, 164, 0);
			} else {
				if (Random_Query(0, 1)) {
					AI_Movement_Track_Append_With_Facing(kActorGenwalkerC, 166, 0, 30);
				}
				AI_Movement_Track_Append(kActorGenwalkerC, 163, 0);
				AI_Movement_Track_Append(kActorGenwalkerC, 164, 0);
			}
		}
		AI_Movement_Track_Repeat(kActorGenwalkerC);
		return true;
	}

	if (set == kSetRC03) {
		isInside = false;
		int waypointStart = 0;
		int waypointEnd = 0;
		do {
			waypointStart = Random_Query(167, 171);
		} while (waypointStart == 168 || waypointStart == 169);
		do {
			waypointEnd = Random_Query(167, 171);
		} while (waypointEnd == waypointStart || waypointEnd == 168 || waypointEnd == 169);
		AI_Movement_Track_Append(kActorGenwalkerC, waypointStart, 0);
		if (waypointStart == 170) {
			AI_Movement_Track_Append(kActorGenwalkerC, 169, 0);
			AI_Movement_Track_Append(kActorGenwalkerC, 168, 0);
		} else if (waypointEnd == 170) {
			AI_Movement_Track_Append(kActorGenwalkerC, 168, 0);
			AI_Movement_Track_Append(kActorGenwalkerC, 169, 0);
		}
		AI_Movement_Track_Append(kActorGenwalkerC, waypointEnd, 0);
		AI_Movement_Track_Repeat(kActorGenwalkerC);
		return true;
	}

	return false;
}
示例#29
0
void AIScriptFreeSlotB::processGoal301() {
	switch (Random_Query(1, 14)) {
	case 1:
		AI_Movement_Track_Append(kActorFreeSlotB, 450, 1);
		AI_Movement_Track_Append(kActorFreeSlotB, 451, 5);
		AI_Movement_Track_Append(kActorFreeSlotB, 450, 0);
		break;

	case 2:
		World_Waypoint_Set(466, 74, 144.98f, -50.13f, -175.75f);
		World_Waypoint_Set(547, 74, 105.6f, -50.13f, -578.46f);
		World_Waypoint_Set(548, 74, 62.0f, -50.13f, -574.0f);
		AI_Movement_Track_Append(kActorFreeSlotB, 466, 1);
		AI_Movement_Track_Append(kActorFreeSlotB, 547, 1);
		AI_Movement_Track_Append(kActorFreeSlotB, 548, 5);
		AI_Movement_Track_Append(kActorFreeSlotB, 466, 5);
		break;

	case 3:
		AI_Movement_Track_Append(kActorFreeSlotB, 446, 15);
		AI_Movement_Track_Append(kActorFreeSlotB, 447, 1);
		AI_Movement_Track_Append(kActorFreeSlotB, 449, 1);
		AI_Movement_Track_Append(kActorFreeSlotB, 448, 2);
		AI_Movement_Track_Append(kActorFreeSlotB, 449, 0);
		break;

	case 4:
		World_Waypoint_Set(466, 77, -22.70f, 6.39f, 33.12f);
		World_Waypoint_Set(547, 77, -6.70f, -1.74f, -362.88f);
		World_Waypoint_Set(548, 77, 164.0f, 11.87f, -1013.0f);
		AI_Movement_Track_Append(kActorFreeSlotB, 466, 2);
		AI_Movement_Track_Append(kActorFreeSlotB, 547, 0);
		AI_Movement_Track_Append(kActorFreeSlotB, 548, 0);
		break;

	case 5:
		AI_Movement_Track_Append(kActorFreeSlotB, 457, 15);
		AI_Movement_Track_Append(kActorFreeSlotB, 458, 0);
		AI_Movement_Track_Append(kActorFreeSlotB, 459, 15);
		break;

	case 6:
		AI_Movement_Track_Append(kActorFreeSlotB, 460, 15);
		AI_Movement_Track_Append(kActorFreeSlotB, 461, 5);
		AI_Movement_Track_Append(kActorFreeSlotB, 460, 15);
		break;

	case 7:
		if (Actor_Query_In_Set(kActorClovis, kSetUG07)) {
			AI_Movement_Track_Append(kActorFreeSlotB, 39, 10);
		} else {
			World_Waypoint_Set(466, 80, -88.78f, -12.21f, -184.08f);
			World_Waypoint_Set(547, 80, 250.0f, -12.21f, -342.0f);
			World_Waypoint_Set(548, 80, -164.78f, -12.21f, -832.08f);
			AI_Movement_Track_Append(kActorFreeSlotB, 466, 5);
			AI_Movement_Track_Append(kActorFreeSlotB, 547, 1);
		}
		break;

	case 8:
		World_Waypoint_Set(466, 80, -88.78f, -12.21f, -184.08f);
		World_Waypoint_Set(547, 80, 250.0f, -12.21f, -342.0f);
		World_Waypoint_Set(548, 80, -164.78f, -12.21f, -832.08f);
		AI_Movement_Track_Append(kActorFreeSlotB, 547, 5);
		AI_Movement_Track_Append(kActorFreeSlotB, 466, 1);
		break;

	case 9:
		World_Waypoint_Set(466, 80, -88.78f, -12.21f, -184.08f);
		World_Waypoint_Set(547, 80, 250.0f, -12.21f, -342.0f);
		World_Waypoint_Set(548, 80, -164.78f, -12.21f, -832.08f);
		AI_Movement_Track_Append(kActorFreeSlotB, 547, 5);
		AI_Movement_Track_Append(kActorFreeSlotB, 548, 1);
		break;

	case 10:
		World_Waypoint_Set(466, 80, -88.78f, -12.21f, -184.08f);
		World_Waypoint_Set(547, 80, 250.0f, -12.21f, -342.0f);
		World_Waypoint_Set(548, 80, -164.78f, -12.21f, -832.08f);
		AI_Movement_Track_Append(kActorFreeSlotB, 548, 5);
		AI_Movement_Track_Append(kActorFreeSlotB, 547, 1);
		break;

	case 11:
		World_Waypoint_Set(466, 82, 91.0f, 156.94f, -498.0f);
		World_Waypoint_Set(547, 82, -149.0f, 156.94f, -498.0f);
		AI_Movement_Track_Append(kActorFreeSlotB, 466, 5);
		AI_Movement_Track_Append(kActorFreeSlotB, 547, 1);
		break;

	case 12:
		World_Waypoint_Set(466, 82, 91.0f, 156.94f, -498.0f);
		World_Waypoint_Set(547, 82, -149.0f, 156.94f, -498.0f);
		AI_Movement_Track_Append(kActorFreeSlotB, 547, 5);
		AI_Movement_Track_Append(kActorFreeSlotB, 466, 1);
		break;

	case 13:
		World_Waypoint_Set(466, 82, -152.51f, 277.31f, 311.98f);
		World_Waypoint_Set(547, 82, -124.51f, 275.08f, 319.98f);
		AI_Movement_Track_Append(kActorFreeSlotB, 466, 1);
		AI_Movement_Track_Append(kActorFreeSlotB, 547, 8);
		AI_Movement_Track_Append(kActorFreeSlotB, 466, 1);
		break;

	case 14:
		World_Waypoint_Set(466, 84, -360.67f, 21.39f, 517.55f);
		World_Waypoint_Set(547, 84, -250.67f, 21.39f, 477.55f);
		World_Waypoint_Set(548, 84, -248.67f, 21.39f, -1454.45f);
		AI_Movement_Track_Append(kActorFreeSlotB, 466, 1);
		AI_Movement_Track_Append(kActorFreeSlotB, 547, 8);
		AI_Movement_Track_Append(kActorFreeSlotB, 548, 1);
		break;

	default:
		AI_Movement_Track_Append(kActorFreeSlotB, 39, Random_Query(1, 10));
		break;
	}
}
示例#30
0
bool AIScriptGaff::GoalChanged(int currentGoalNumber, int newGoalNumber) {
	switch (newGoalNumber) {
	case kGoalGaffCT12WaitForMcCoy:
		Actor_Put_In_Set(kActorGaff, kSetCT01_CT12);
		Actor_Set_At_Waypoint(kActorGaff, 43, 0);
		return true;

	case kGoalGaffCT12GoToSpinner:
		AI_Movement_Track_Append(kActorGaff, 123, 1);
		AI_Movement_Track_Repeat(kActorGaff);
		return true;

	case kGoalGaffMA01ApproachMcCoy:
		Player_Loses_Control();
		AI_Movement_Track_Flush(kActorGaff);
		AI_Movement_Track_Append(kActorGaff, 124, 0);
		AI_Movement_Track_Append(kActorGaff, 126, 0);
		AI_Movement_Track_Repeat(kActorGaff);
		return true;

	case kGoalGaffMA01Leave:
		AI_Movement_Track_Flush(kActorGaff);
		AI_Movement_Track_Append(kActorGaff, 124, 0);
		AI_Movement_Track_Append(kActorGaff, 35, 0);
		AI_Movement_Track_Repeat(kActorGaff);
		return true;

	case kGoalGaffCT12Leave:
		AI_Movement_Track_Flush(kActorGaff);
		AI_Movement_Track_Append(kActorGaff, 35, 90);
		AI_Movement_Track_Repeat(kActorGaff);
		return true;

	case kGoalGaffCT12FlyAway:
		Game_Flag_Reset(kFlagCT12GaffSpinner);
		Scene_Loop_Set_Default(2);
		Scene_Loop_Start_Special(kSceneLoopModeOnce, 6, true);
		return true;

	case kGoalGaffStartWalkingAround:
		AI_Movement_Track_Flush(kActorGaff);
		AI_Movement_Track_Append(kActorGaff, 35, 300);
		AI_Movement_Track_Repeat(kActorGaff);
		return true;

	case kGoalGaffWalkAround:
		{
			AI_Movement_Track_Flush(kActorGaff);
			AI_Movement_Track_Append(kActorGaff, 82, 1);
			AI_Movement_Track_Append(kActorGaff, 76, 1);
			AI_Movement_Track_Append(kActorGaff, 78, 1);
			int rnd = Random_Query(1, 3);
			if (rnd == 1) {
				AI_Movement_Track_Append(kActorGaff, 271, 0);
				AI_Movement_Track_Append(kActorGaff, 272, 0);
				AI_Movement_Track_Append(kActorGaff, 273, 0);
			} else if (rnd == 2) {
				AI_Movement_Track_Append(kActorGaff, 273, 0);
				AI_Movement_Track_Append(kActorGaff, 272, 0);
				AI_Movement_Track_Append(kActorGaff, 271, 0);
			} else if (rnd == 3) {
				AI_Movement_Track_Append(kActorGaff, 272, 0);
				AI_Movement_Track_Append(kActorGaff, 273, 0);
			}
			AI_Movement_Track_Append(kActorGaff, 274, 0);
			AI_Movement_Track_Append(kActorGaff, 275, 0);
			AI_Movement_Track_Repeat(kActorGaff);
		}
		return true;

	case kGoalGaffRepeatWalkingAround:
		AI_Movement_Track_Flush(kActorGaff);
		AI_Movement_Track_Append(kActorGaff, 35, 90);
		AI_Movement_Track_Repeat(kActorGaff);
		return true;

	case 299:
		AI_Movement_Track_Flush(kActorGaff);
		Actor_Put_In_Set(kActorGaff, kSetFreeSlotC);
		Actor_Set_At_Waypoint(kActorGaff, 35, 0);
		return true;

	case kGoalGaffMA07Wait:
		Player_Loses_Control();
		Actor_Put_In_Set(kActorGaff, kSetMA07);
		Actor_Set_At_XYZ(kActorGaff, -102.54f, -172.43f, 463.18f, 1015);
		Actor_Set_Goal_Number(kActorGaff, kGoalGaffMA07TalkToMcCoy);
		return true;

	case kGoalGaffMA07TalkToMcCoy:
		Game_Flag_Set(kFlagMA07GaffTalk);
		Actor_Face_Actor(kActorGaff, kActorMcCoy, true);
		Actor_Says(kActorGaff, 110, 12);
		Actor_Face_Actor(kActorMcCoy, kActorGaff, true);
		Actor_Says(kActorMcCoy, 2945, 14);
		Loop_Actor_Walk_To_Actor(kActorGaff, kActorMcCoy, 180, false, false);
		Actor_Says(kActorGaff, 120, 16);
		Actor_Says(kActorGaff, 130, 13);
		Actor_Says(kActorMcCoy, 2950, kAnimationModeTalk);
		Actor_Says(kActorMcCoy, 2955, 16);
		Actor_Says_With_Pause(kActorGaff, 140, 1.0f, 14);
		Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorGaff, 36, false, false);
		Actor_Says(kActorGaff, 150, kAnimationModeTalk);
		Actor_Says(kActorMcCoy, 2960, 12);
		Actor_Says_With_Pause(kActorGaff, 160, 1.0f, 16);
		Actor_Says(kActorMcCoy, 2965, 13);
		Actor_Says_With_Pause(kActorGaff, 170, 1.0f, kAnimationModeTalk);
		Actor_Says_With_Pause(kActorGaff, 180, 1.0f, 12);
		Actor_Says(kActorGaff, 190, 14);
		Actor_Says(kActorGaff, 200, 15);
		Async_Actor_Walk_To_XYZ(kActorGaff, -388.44f, -162.8f, 165.08f, false, false);
		Delay(4000);
		Player_Gains_Control();
		Actor_Start_Speech_Sample(kActorGaff, 210);
		Actor_Set_Goal_Number(kActorGaff, kGoalGaffMA07Left);
		return true;

	case kGoalGaffMA07Left:
		return true;

	case kGoalGaffMA07ShootMcCoy:
		Actor_Face_Actor(kActorGaff, kActorMcCoy, true);
		Actor_Change_Animation_Mode(kActorGaff, kAnimationModeCombatAttack);
		Sound_Play(kSfxSMCAL3, 100, 0, 0, 50);
		Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
		Actor_Retired_Here(kActorMcCoy, 12, 12, true, -1);
		return true;

	case kGoalGaffGone:
		AI_Movement_Track_Flush(kActorGaff);
		Actor_Put_In_Set(kActorGaff, kSetKP05_KP06);
		Actor_Set_At_XYZ(kActorGaff, -782.15f, 8.26f, -263.64f, 52);
		return true;
	}
	return false;
}