예제 #1
0
파일: ma02.cpp 프로젝트: DrItanium/scummvm
void SceneScriptMA02::PlayerWalkedIn() {
	if (Game_Flag_Query(34)) {
		sub_402044();
	}
	if (Game_Flag_Query(36)) {
		Loop_Actor_Walk_To_XYZ(kActorMcCoy, -148.12f, -144.13f, 34.27f, 0, 1, false, 0);
	}
	if (Global_Variable_Query(1) == 4 && !Game_Flag_Query(655)) {
		Game_Flag_Set(623);
		Game_Flag_Set(655);
		sub_401E4C();
		Loop_Actor_Walk_To_XYZ(kActorMcCoy, 23.19f, -144.12f, 378.27f, 0, 0, false, 0);
		Game_Flag_Set(33);
		Set_Enter(52, 52);
		//	return true;
		return;
	}
	if (Global_Variable_Query(1) == 5 && !Game_Flag_Query(654)) {
		if (Game_Flag_Query(653)) {
			Actor_Says(kActorMcCoy, 2390, 0);
			Music_Play(2, 25, 0, 3, -1, 0, 0);
		} else {
			Actor_Says(kActorMcCoy, 2385, 3);
		}
		Game_Flag_Set(654);
		Autosave_Game(3);
	}
	if (Global_Variable_Query(1) < 4 && !Game_Flag_Query(36) && Actor_Query_Goal_Number(kActorMaggie) != 2) {
		Actor_Set_Goal_Number(kActorMaggie, 1);
		if (!Game_Flag_Query(60)) {
			Game_Flag_Set(60);
			Actor_Face_Actor(kActorMcCoy, kActorMaggie, true);
			Actor_Voice_Over(1210, kActorVoiceOver);
			if (!Game_Flag_Query(378)) {
				Actor_Voice_Over(1220, kActorVoiceOver);
			}
			Actor_Voice_Over(1230, kActorVoiceOver);
			if (!Game_Flag_Query(378)) {
				Actor_Voice_Over(1240, kActorVoiceOver);
				Actor_Voice_Over(1250, kActorVoiceOver);
			}
		}
	}
	Game_Flag_Reset(36);
	Game_Flag_Reset(34);
	//return false;
	return;
}
예제 #2
0
파일: sadik.cpp 프로젝트: fingolfin/scummvm
void AIScriptSadik::Initialize() {
	_animationFrame = 0;
	_animationState = 0;
	_animationStateNext = 0;
	_animationNext = 0;

	_flag = 0;
	_nextSoundId = -1; // changed from original (0) to be more clear that this is an invalid sfx id
	_var2 = 0;
	_var3 = 0;
	_var4 = 1;

	Actor_Put_In_Set(kActorSadik, kSetFreeSlotA);
	Actor_Set_At_Waypoint(kActorSadik, 33, 0);
	Actor_Set_Goal_Number(kActorSadik, kGoalSadikDefaut);
}
예제 #3
0
void AIScriptSadik::Initialize() {
	_animationFrame = 0;
	_animationState = 0;
	_animationStateNext = 0;
	_animationNext = 0;

	_flag = 0;
	_var1 = 0;
	_var2 = 0;
	_var3 = 0;
	_var4 = 1;

	Actor_Put_In_Set(kActorSadik, kSetFreeSlotA);
	Actor_Set_At_Waypoint(kActorSadik, 33, 0);
	Actor_Set_Goal_Number(kActorSadik, kGoalSadikDefaut);
}
예제 #4
0
파일: hf01.cpp 프로젝트: 86400/scummvm
void ScriptHF01::SceneFrameAdvanced(int frame) {
	if (frame == 10) {
		Sound_Play(118, 40, 0, 0, 50);
	}
	if (frame == 72 || frame == 193) {
		Sound_Play(116, 100, -50, -50, 50);
	}
	if (frame == 88 || frame == 214) {
		Sound_Play(119, 100, -50, -50, 50);
	}
	if (frame == 242) {
		Sound_Play(117, 40, -50, 80, 50);
	}
	if (Actor_Query_Goal_Number(31) == 1) {
		Actor_Set_Goal_Number(31, 0);
	}
}
예제 #5
0
파일: bryant.cpp 프로젝트: athrxx/scummvm
bool AIScriptBryant::Update() {
	if (Global_Variable_Query(kVariableChapter) == 2
	 && Actor_Query_Goal_Number(kActorBryant) <= 101
	 && Player_Query_Current_Scene() == kSceneBB05
	) {
		Actor_Set_Goal_Number(kActorBryant, 101);
		return true;
	}

	if ( Global_Variable_Query(kVariableChapter) == 3
	 &&  Player_Query_Current_Scene() == kSceneBB05
	 && !Game_Flag_Query(kFlagNotUsed686)
	) {
		Game_Flag_Set(kFlagNotUsed686);
		return true;
	}
	return false;
}
예제 #6
0
파일: bryant.cpp 프로젝트: athrxx/scummvm
bool AIScriptBryant::ChangeAnimationMode(int mode) {
	switch (mode) {
	case kAnimationModeIdle:
		_animationState = 0;
		_animationFrame = 0;
		break;
	case kAnimationModeWalk:
		_animationState = 1;
		_animationFrame = 0;
		break;
	case kAnimationModeDie:
		_animationState = 2;
		_animationFrame = 0;
		Actor_Set_Goal_Number(kActorBryant, 0);
		break;
	}
	return true;
}
예제 #7
0
void SceneScriptUG01::PlayerWalkedIn() {
	if (Game_Flag_Query(kFlagUG02toUG01)) {
		Loop_Actor_Walk_To_XYZ(kActorMcCoy, -55.0f, -50.13f, -288.0f, 12, 0, false, 0);
		Game_Flag_Reset(kFlagUG02toUG01);
	}

	if (Game_Flag_Query(kFlagRC03toUG01)) {
		Actor_Set_At_XYZ(kActorMcCoy, -70.0f, 93.87f, -500.0f, 768);
		Loop_Actor_Travel_Ladder(kActorMcCoy, 12, 0, 0);
		Loop_Actor_Walk_To_XYZ(kActorMcCoy, -58.0f, -50.13f, -488.0f, 0, 0, false, 0);
		Game_Flag_Reset(kFlagRC03toUG01);
	}

	if (Actor_Query_Goal_Number(kActorLucy) == 310) {
		Music_Play(21, 35, 0, 3, -1, 0, 0);
		Actor_Set_Goal_Number(kActorLucy, 311);
	}
	//return false;
}
예제 #8
0
파일: ug05.cpp 프로젝트: 86400/scummvm
void ScriptUG05::PlayerWalkedIn() {
    if (Game_Flag_Query(663)) {
        if (Game_Flag_Query(368)) {
            Music_Stop(2);
            Actor_Put_In_Set(24, 78);
            Actor_Set_At_XYZ(24, 4.22f, -1.37f, -925.0f, 750);
            Actor_Set_Goal_Number(24, 599);
            Actor_Retired_Here(24, 70, 36, 1, -1);
            int v0 = sub_4021B0();
            if (v0 == 3) {
                Actor_Put_In_Set(3, 78);
                Actor_Set_At_XYZ(3, -100.0f, -10.31f, -906.0f, 866);
                Actor_Force_Stop_Walking(3);
            } else if (v0 == 6) {
                Actor_Put_In_Set(6, 78);
                Actor_Set_At_XYZ(6, -100.0f, -10.31f, -906.0f, 866);
                Actor_Force_Stop_Walking(6);
            }
        } else {
            if (!Actor_Query_In_Set(23, 78)) {
                Actor_Put_In_Set(23, 78);
                Actor_Set_At_XYZ(23, 0.0f, -1.37f, -1400.0f, 768);
            }
            if (!Actor_Query_In_Set(24, 78)) {
                ADQ_Flush();
                ADQ_Add(24, 280, 3);
                Actor_Put_In_Set(24, 78);
                Actor_Set_At_XYZ(24, -16.0f, -1.37f, -960.0f, 768);
            }
        }
    }
    if (Game_Flag_Query(360)) {
        if (Game_Flag_Query(663) && !Game_Flag_Query(368)) {
            Loop_Actor_Walk_To_XYZ(0, -288.35f, 132.77f, -1092.36f, 0, 1, false, 0);
        } else {
            Loop_Actor_Travel_Stairs(0, 2, 0, 0);
        }
    }
    if (Game_Flag_Query(663)) {
        Game_Flag_Query(368);
    }
    Game_Flag_Reset(360);
}
예제 #9
0
파일: ug05.cpp 프로젝트: AReim1982/scummvm
void SceneScriptUG05::PlayerWalkedIn() {
	if (Game_Flag_Query(663)) {
		if (Game_Flag_Query(368)) {
			Music_Stop(2);
			Actor_Put_In_Set(kActorOfficerGrayford, 78);
			Actor_Set_At_XYZ(kActorOfficerGrayford, 4.22f, -1.37f, -925.0f, 750);
			Actor_Set_Goal_Number(kActorOfficerGrayford, 599);
			Actor_Retired_Here(kActorOfficerGrayford, 70, 36, 1, -1);
			int v0 = sub_4021B0();
			if (v0 == kActorDektora) {
				Actor_Put_In_Set(kActorDektora, 78);
				Actor_Set_At_XYZ(kActorDektora, -100.0f, -10.31f, -906.0f, 866);
				Actor_Force_Stop_Walking(kActorDektora);
			} else if (v0 == kActorLucy){
				Actor_Put_In_Set(kActorLucy, 78);
				Actor_Set_At_XYZ(kActorLucy, -100.0f, -10.31f, -906.0f, 866);
				Actor_Force_Stop_Walking(kActorLucy);
			}
		} else {
			if (!Actor_Query_In_Set(kActorOfficerLeary, 78)) {
				Actor_Put_In_Set(kActorOfficerLeary, 78);
				Actor_Set_At_XYZ(kActorOfficerLeary, 0.0f, -1.37f, -1400.0f, 768);
			}
			if (!Actor_Query_In_Set(kActorOfficerGrayford, 78)) {
				ADQ_Flush();
				ADQ_Add(kActorOfficerGrayford, 280, 3);
				Actor_Put_In_Set(kActorOfficerGrayford, 78);
				Actor_Set_At_XYZ(kActorOfficerGrayford, -16.0f, -1.37f, -960.0f, 768);
			}
		}
	}
	if (Game_Flag_Query(360)) {
		if (Game_Flag_Query(663) && !Game_Flag_Query(368)) {
			Loop_Actor_Walk_To_XYZ(kActorMcCoy, -288.35f, 132.77f, -1092.36f, 0, 1, false, 0);
		} else {
			Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 0, 0);
		}
	}
	if (Game_Flag_Query(663)) {
		Game_Flag_Query(368);
	}
	Game_Flag_Reset(360);
}
예제 #10
0
파일: ct05.cpp 프로젝트: fingolfin/scummvm
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;
}
예제 #11
0
파일: nr04.cpp 프로젝트: 86400/scummvm
bool ScriptNR04::ClickedOn3DObject(const char *objectName, bool a2) {
	if (Object_Query_Click("B.TV01", objectName) || Object_Query_Click("B.TV02", objectName) || Object_Query_Click("B.TV03", objectName) || Object_Query_Click("B.TV05", objectName) || Object_Query_Click("DESK", objectName)) {
		if (!Loop_Actor_Walk_To_Waypoint(0, 546, 0, 1, false)) {
			if (!Object_Query_Click("DESK", objectName)) {
				Actor_Face_Object(0, "B.TV01", true);
				Actor_Voice_Over(1530, 99);
				Actor_Voice_Over(1540, 99);
				Actor_Voice_Over(1550, 99);
			} else {
				Actor_Face_Object(0, "DESK", true);
				if (!Actor_Clue_Query(0, 56)) {
					Actor_Voice_Over(1600, 99);
					Actor_Voice_Over(1610, 99);
				} else if (Actor_Clue_Query(0, 100)) {
					Actor_Says(0, 8580, 3);
				} else {
					Actor_Clue_Acquire(0, 100, 0, -1);
					Item_Pickup_Spin_Effect(961, 247, 141);
					Actor_Voice_Over(1560, 99);
					Actor_Voice_Over(1570, 99);
					Actor_Voice_Over(1580, 99);
					Actor_Voice_Over(1590, 99);
				}

			}
		}
	} else if (Object_Query_Click("TORUS01", objectName)
		&& !Loop_Actor_Walk_To_XYZ(0, 18.56f, 0.0f, 38.86f, 0, 1, false, 0)
		&& !Game_Flag_Query(605)) {
		Unclickable_Object("TORUS01");
		Scene_Exits_Disable();
		Player_Loses_Control();
		Game_Flag_Set(605);
		Actor_Face_Object(0, "TORUS01", true);
		Item_Pickup_Spin_Effect(975, 358, 160);
		Actor_Voice_Over(1620, 99);
		Actor_Voice_Over(1630, 99);
		Actor_Clue_Acquire(0, 89, 0, -1);
		Actor_Set_Goal_Number(18, 201);
	}
	return false;
}
예제 #12
0
bool SceneScriptNR04::ClickedOn3DObject(const char *objectName, bool a2) {
	if (Object_Query_Click("B.TV01", objectName) || Object_Query_Click("B.TV02", objectName) || Object_Query_Click("B.TV03", objectName) || Object_Query_Click("B.TV05", objectName) || Object_Query_Click("DESK", objectName)) {
		if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 546, 0, 1, false)) {
			if (!Object_Query_Click("DESK", objectName)) {
				Actor_Face_Object(kActorMcCoy, "B.TV01", true);
				Actor_Voice_Over(1530, kActorVoiceOver);
				Actor_Voice_Over(1540, kActorVoiceOver);
				Actor_Voice_Over(1550, kActorVoiceOver);
			} else {
				Actor_Face_Object(kActorMcCoy, "DESK", true);
				if (!Actor_Clue_Query(kActorMcCoy, kCluePeruvianLadyInterview)) {
					Actor_Voice_Over(1600, kActorVoiceOver);
					Actor_Voice_Over(1610, kActorVoiceOver);
				} else if (Actor_Clue_Query(kActorMcCoy, kClueCollectionReceipt)) {
					Actor_Says(kActorMcCoy, 8580, 3);
				} else {
					Actor_Clue_Acquire(kActorMcCoy, kClueCollectionReceipt, 0, -1);
					Item_Pickup_Spin_Effect(961, 247, 141);
					Actor_Voice_Over(1560, kActorVoiceOver);
					Actor_Voice_Over(1570, kActorVoiceOver);
					Actor_Voice_Over(1580, kActorVoiceOver);
					Actor_Voice_Over(1590, kActorVoiceOver);
				}

			}
		}
	} else if (Object_Query_Click("TORUS01", objectName)
		&& !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 18.56f, 0.0f, 38.86f, 0, 1, false, 0)
		&& !Game_Flag_Query(605)) {
		Unclickable_Object("TORUS01");
		Scene_Exits_Disable();
		Player_Loses_Control();
		Game_Flag_Set(605);
		Actor_Face_Object(kActorMcCoy, "TORUS01", true);
		Item_Pickup_Spin_Effect(975, 358, 160);
		Actor_Voice_Over(1620, kActorVoiceOver);
		Actor_Voice_Over(1630, kActorVoiceOver);
		Actor_Clue_Acquire(kActorMcCoy, kClueEarlyQsClub, 0, -1);
		Actor_Set_Goal_Number(kActorEarlyQ, 201);
	}
	return false;
}
예제 #13
0
void AIScriptClovis::Retired(int byActorId) {
	if (Game_Flag_Query(653)) {
		if (Actor_Query_In_Set(kActorClovis, kSetKP07)) {
			Global_Variable_Decrement(kVariableReplicants, 1);
			Actor_Set_Goal_Number(kActorClovis, 599);

			if (Global_Variable_Query(kVariableReplicants) == 0) {
				Player_Loses_Control();
				Delay(2000);
				Player_Set_Combat_Mode(false);
				Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, true, false, 0);
				Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
				Ambient_Sounds_Remove_All_Looping_Sounds(1);
				Game_Flag_Set(579);
				Game_Flag_Reset(653);
				Set_Enter(kSetKP05_KP06, kSceneKP06);
			}
		}
	}
}
예제 #14
0
파일: mutant2.cpp 프로젝트: athrxx/scummvm
bool AIScriptMutant2::Update() {
	if (Global_Variable_Query(kVariableChapter) == 4) {
		switch (Actor_Query_Goal_Number(kActorMutant2)) {
		case 401:
			if (Actor_Query_Which_Set_In(kActorMutant2) == Player_Query_Current_Set()
			 && (Actor_Query_Friendliness_To_Other(kActorMutant2, kActorMcCoy) < 20
			  || Actor_Query_Combat_Aggressiveness(kActorMutant2) >= 60
			 )
			) {
				Actor_Set_Goal_Number(kActorMutant2, 410);
			}
			break;

		case 404:
			if (!Game_Flag_Query(kFlagMutantsPaused)) {
				Actor_Set_Goal_Number(kActorMutant2, 403);
			}
			break;

		case 410:
			if (Actor_Query_Which_Set_In(kActorMutant2) != Player_Query_Current_Set()) {
				Non_Player_Actor_Combat_Mode_Off(kActorMutant2);
				Actor_Set_Goal_Number(kActorMutant2, 403);
			}
			break;

		case 599:
			if (Actor_Query_Which_Set_In(kActorMutant2) != Player_Query_Current_Set()) {
				Actor_Set_Goal_Number(kActorMutant2, 403);
			}
			break;
		}

		if (Game_Flag_Query(kFlagMutantsPaused)
		 && Actor_Query_Goal_Number(kActorMutant2) != 599
		) {
			Actor_Set_Goal_Number(kActorMutant2, 404);
		}
	} else if (Global_Variable_Query(kVariableChapter) == 5
	        && Actor_Query_Goal_Number(kActorMutant2) != 590
	) {
		if (Actor_Query_Which_Set_In(kActorMutant2) != Player_Query_Current_Set()) {
			Actor_Set_Goal_Number(kActorMutant2, 590);
		}
	}

	return false;
}
예제 #15
0
파일: ug18.cpp 프로젝트: athrxx/scummvm
void SceneScriptUG18::talkWithClovis() {
	ADQ_Flush();
	Actor_Start_Speech_Sample(kActorClovis, 590);
	Delay(500);
	Loop_Actor_Walk_To_XYZ(kActorGuzza, 126.79f, 0.0f, -362.17f, 0, false, false, 0);
	Actor_Face_Heading(kActorGuzza, 729, false);
	Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaUG18Target);
	ADQ_Add(kActorSadik, 350, 13);
	ADQ_Add_Pause(1500);
	ADQ_Add(kActorGuzza, 1150, 58);
	ADQ_Add(kActorClovis, 600, 13);
	ADQ_Add_Pause(1000);
	ADQ_Add(kActorGuzza, 1160, 60);
	ADQ_Add_Pause(500);
	ADQ_Add(kActorGuzza, 1170, 59);
	ADQ_Add(kActorGuzza, 1180, 58);
	ADQ_Add(kActorClovis, 610, 13);
	ADQ_Add(kActorGuzza, 1190, 60);
	ADQ_Add(kActorClovis, 620, 13);
	ADQ_Add(kActorGuzza, 1200, 59);
}
예제 #16
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;
}
예제 #17
0
파일: hf04.cpp 프로젝트: fingolfin/scummvm
void SceneScriptHF04::SceneLoaded() {
	if (Game_Flag_Query(kFlagHF04DoorsClosed)) {
		Unobstacle_Object("PIVOT_WALL#1",  true);
		Unobstacle_Object("PIVOT_WALL#02", true);
		Unobstacle_Object("PIVOT_WALL#03", true);
	} else {
		Unobstacle_Object("HIDE_WALL_A", true);
		Unobstacle_Object("HIDE_WALL_B", true);
	}

	if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyHF03RunToHF042) {
		if (Actor_Clue_Query(kActorLucy, kClueMcCoyHelpedLucy)
		 && Global_Variable_Query(kVariableHollowayArrest) != 3
		) {
			Game_Flag_Set(kFlagLucyRanAway);
		} else {
			Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04Start);
			Game_Flag_Reset(kFlagHF04DoorsClosed);
		}
	}
}
예제 #18
0
파일: ct12.cpp 프로젝트: 86400/scummvm
void ScriptCT12::PlayerWalkedIn() {
	if (Global_Variable_Query(1) < 2 && !Game_Flag_Query(64) && Actor_Query_Goal_Number(53) == 1) {
		Player_Loses_Control();
		Loop_Actor_Walk_To_Actor(53, 0, 48, 0, false);
		Actor_Face_Actor(53, 0, true);
		Actor_Face_Actor(0, 53, true);
		Actor_Says(53, 0, 3);
		Actor_Says(0, 670, 3);
		Actor_Says(53, 10, 3);
		Actor_Says(0, 675, 3);
		Actor_Says(53, 20, 3);
		Actor_Says(0, 680, 3);
		Actor_Says(53, 30, 3);
		Actor_Says(0, 685, 3);
		Actor_Says(53, 40, 3);
		Actor_Says(0, 690, 3);
		Actor_Clue_Acquire(0, 33, 1, 53);
		Game_Flag_Set(64);
		CDB_Set_Crime(20, 8);
		if (Game_Flag_Query(64) && Game_Flag_Query(40)) {
			Actor_Says(53, 50, 3);
			Actor_Says(0, 695, 3);
			Actor_Says(53, 60, 3);
			Actor_Says(0, 700, 3);
			Actor_Says(53, 70, 3);
			Actor_Clue_Acquire(53, 222, 1, -1);
		} else if (Game_Flag_Query(64) && Game_Flag_Query(41)) {
			Actor_Says(53, 80, 3);
			Actor_Says(53, 90, 3);
			Actor_Says(0, 705, 3);
			Actor_Says(53, 100, 3);
			Actor_Clue_Acquire(53, 215, 1, -1);
		}
		Actor_Set_Goal_Number(53, 2);
	}
	if (Game_Flag_Query(86)) {
		Loop_Actor_Walk_To_XYZ(0, -520.0f, -6.5f, 1103.0f, 0, 0, false, 0);
		Game_Flag_Reset(86);
	}
}
예제 #19
0
void SceneScriptCT12::PlayerWalkedIn() {
	if (Global_Variable_Query(kVariableChapter) < 2 && !Game_Flag_Query(64) && Actor_Query_Goal_Number(kActorGaff) == 1) {
		Player_Loses_Control();
		Loop_Actor_Walk_To_Actor(kActorGaff, kActorMcCoy, 48, 0, false);
		Actor_Face_Actor(kActorGaff, kActorMcCoy, true);
		Actor_Face_Actor(kActorMcCoy, kActorGaff, true);
		Actor_Says(kActorGaff, 0, 3);
		Actor_Says(kActorMcCoy, 670, 3);
		Actor_Says(kActorGaff, 10, 3);
		Actor_Says(kActorMcCoy, 675, 3);
		Actor_Says(kActorGaff, 20, 3);
		Actor_Says(kActorMcCoy, 680, 3);
		Actor_Says(kActorGaff, 30, 3);
		Actor_Says(kActorMcCoy, 685, 3);
		Actor_Says(kActorGaff, 40, 3);
		Actor_Says(kActorMcCoy, 690, 3);
		Actor_Clue_Acquire(kActorMcCoy, kClueGaffsInformation, 1, kActorGaff);
		Game_Flag_Set(64);
		CDB_Set_Crime(kClueZuben, kCrimeMoonbusHijacking);
		if (Game_Flag_Query(64) && Game_Flag_Query(40)) {
			Actor_Says(kActorGaff, 50, 3);
			Actor_Says(kActorMcCoy, 695, 3);
			Actor_Says(kActorGaff, 60, 3);
			Actor_Says(kActorMcCoy, 700, 3);
			Actor_Says(kActorGaff, 70, 3);
			Actor_Clue_Acquire(kActorGaff, kClueMcCoyRetiredZuben, 1, -1);
		} else if (Game_Flag_Query(64) && Game_Flag_Query(kFlagZubenSpared)) {
			Actor_Says(kActorGaff, 80, 3);
			Actor_Says(kActorGaff, 90, 3);
			Actor_Says(kActorMcCoy, 705, 3);
			Actor_Says(kActorGaff, 100, 3);
			Actor_Clue_Acquire(kActorGaff, kClueMcCoyLetZubenEscape, 1, -1);
		}
		Actor_Set_Goal_Number(kActorGaff, 2);
	}
	if (Game_Flag_Query(86)) {
		Loop_Actor_Walk_To_XYZ(kActorMcCoy, -520.0f, -6.5f, 1103.0f, 0, 0, false, 0);
		Game_Flag_Reset(86);
	}
}
예제 #20
0
bool AIScriptSadik::ShotAtAndHit() {

	if (Actor_Query_Goal_Number(kActorSadik) == 301) {
		if (Game_Flag_Query(kFlagSadikIsReplicant)) {
			Actor_Set_Health(kActorSadik, 60, 60);
		} else {
			Actor_Set_Health(kActorSadik, 40, 40);
		}
		return true;
	}

	if (Actor_Query_Goal_Number(kActorSadik) == 414
	 || Actor_Query_Goal_Number(kActorSadik) == 416
	) {
		Game_Flag_Set(714);
		if (Actor_Query_Which_Set_In(kActorSadik) != kSetKP07) {
			Actor_Set_Goal_Number(kActorSadik, 418);
			Scene_Exits_Disable();
		}
	}
	return false;
}
예제 #21
0
bool SceneScriptCT06::ClickedOnExit(int exitId) {
	if (exitId == 0) {
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 20.41f, -58.23f, -2.17f, 0, 1, false, 0)) {
			Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
			Ambient_Sounds_Remove_All_Looping_Sounds(1);
			Game_Flag_Set(78);
			Set_Enter(28, kSceneCT05);
			Game_Flag_Reset(212);
		}
		return true;
	}
	if (exitId == 1) {
		if (Actor_Query_Goal_Number(kActorZuben) == 13) {
			if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 203.91f, -58.02f, 0.47f, 0, 1, false, 0)) {
				Ambient_Sounds_Remove_Sound(196, true);
				Ambient_Sounds_Remove_Sound(197, true);
				Ambient_Sounds_Remove_Sound(198, true);
				Ambient_Sounds_Remove_Sound(199, true);
				Player_Loses_Control();
				Actor_Set_Goal_Number(kActorZuben, 11);
				Game_Flag_Reset(212);
			}
			return true;
		}
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 203.91f, -58.02f, 0.47f, 0, 1, false, 0)) {
			if (Global_Variable_Query(kVariableChapter) < 3) {
				Actor_Face_Object(kActorMcCoy, "DOOR", true);
				Actor_Says(kActorMcCoy, 8522, 12);
			} else {
				Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
				Ambient_Sounds_Remove_All_Looping_Sounds(1);
				Game_Flag_Set(79);
				Set_Enter(6, kSceneCT08);
				Game_Flag_Reset(212);
			}
		}
	}
	return false;
}
예제 #22
0
파일: ma01.cpp 프로젝트: fingolfin/scummvm
void SceneScriptMA01::InitializeScene() {
	Setup_Scene_Information(381.0f, 0.0f, 54.0f, 992);
	if (Game_Flag_Query(kFlagSpinnerAtMA01)) {
		Setup_Scene_Information( 381.0f, 0.0f,   54.0f, 992);
	}
	if (Game_Flag_Query(kFlagMA06toMA01)) {
		Setup_Scene_Information(1446.0f, 0.0f, -725.0f, 660);
	}

	Scene_Exit_Add_2D_Exit(kMA01ExitMA06, 328, 132, 426, 190, 0);
	if (Game_Flag_Query(kFlagSpinnerAtMA01)) {
		Scene_Exit_Add_2D_Exit(kMA01ExitSpinner, 234, 240, 398, 328, 2);
	}

	Ambient_Sounds_Add_Looping_Sound(kSfxROOFRAN1, 90,    0, 1);
	Ambient_Sounds_Add_Looping_Sound(kSfxROOFAIR1, 40, -100, 1);
	Ambient_Sounds_Add_Looping_Sound(kSfxROOFRMB1, 40,  100, 1);
	Ambient_Sounds_Add_Sound(kSfxSPIN2B,  10, 100, 25,  50, 0, 0, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(kSfxSPIN3A,  10, 100, 25,  50, 0, 0, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(kSfxTHNDER2, 10,  70, 50, 100, 0, 0, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(kSfxTHNDER3, 10,  70, 50, 100, 0, 0, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(kSfxTHNDER4, 10,  70, 50, 100, 0, 0, -101, -101, 0, 0);

	if (Game_Flag_Query(kFlagMA06toMA01)) {
		Scene_Loop_Set_Default(kMA01LoopMainLoop);
		Game_Flag_Reset(kFlagMA06toMA01);
	} else {
		Actor_Set_Invisible(kActorMcCoy, true);
		Game_Flag_Set(kFlagArrivedFromSpinner2);
		Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kMA01LoopInshotRoof, false);
		Scene_Loop_Set_Default(kMA01LoopMainLoop);
	}

	if (Game_Flag_Query(kFlagMA01GaffApproachMcCoy)) {
		Actor_Set_Goal_Number(kActorGaff, kGoalGaffMA01ApproachMcCoy);
		Game_Flag_Reset(kFlagMA01GaffApproachMcCoy);
	}
}
예제 #23
0
파일: nr08.cpp 프로젝트: 86400/scummvm
void ScriptNR08::SceneFrameAdvanced(int frame) {
	if (!Music_Is_Playing()) {
		sub_4021B4();
	}
	Set_Fade_Color(0, 0, 0);
	if (frame >= 76 && frame < 91) {
		Set_Fade_Density((frame - 76) / 14.0f);
		Music_Stop(3);
		Ambient_Sounds_Play_Sound(566, 27, 0, 99, 0);
	} else if (frame >= 91 && frame < 120) {
		Actor_Set_Invisible(0, true);
		Set_Fade_Density(1.0f);
	} else if (frame >= 120 && frame < 135) {
		Set_Fade_Density((134 - frame) / 14.0f);
		Music_Play(7, 61, 0, 1, -1, 0, 0);
	} else {
		Actor_Set_Invisible(0, false);
		Set_Fade_Density(0.0f);
	}
	if (Game_Flag_Query(651) && !Game_Flag_Query(636)) {
		Game_Flag_Set(636);
		Scene_Exits_Disable();
		Scene_Loop_Set_Default(1);
		Scene_Loop_Start_Special(2, 3, 1);
	}
	if (frame == 95) {
		Actor_Put_In_Set(3, 91);
		Actor_Set_At_Waypoint(3, 33, 0);
		Actor_Change_Animation_Mode(3, 0);
		Actor_Set_Goal_Number(3, 200);
		Scene_Exit_Add_2D_Exit(1, 0, 309, 30, 398, 3);
		Scene_Exit_Add_2D_Exit(2, 520, 330, 556, 386, 0);
	}
	if (frame == 130) {
		Scene_Exits_Enable();
	}
	//return false;
}
예제 #24
0
파일: bryant.cpp 프로젝트: athrxx/scummvm
void AIScriptBryant::Initialize() {
	_animationFrame = 0;
	_animationState = 0;
	_animationStateNext = 0;
	_animationNext = 0;

	World_Waypoint_Set(324, kSetBB05,       267.0f,  -60.3f,    203.0f);
	World_Waypoint_Set(325, kSetBB05,        84.0f,  -60.3f,    337.0f);
	World_Waypoint_Set(326, kSetBB06_BB07,  -36.0f,    0.0f,    185.0f);
	World_Waypoint_Set(327, kSetBB06_BB07, -166.0f,    0.0f,   -103.0f);
	World_Waypoint_Set(328, kSetBB07,      -556.0f, 252.59f, -1018.11f);
	World_Waypoint_Set(329, kSetBB07,      -655.0f,  252.6f,  -1012.0f);
	World_Waypoint_Set(330, kSetBB07,      -657.0f,  253.0f,  -1127.0f);
	World_Waypoint_Set(331, kSetBB12,       163.8f,    0.0f,     67.0f);
	World_Waypoint_Set(332, kSetBB06_BB07,  -39.0f,    0.0f,     11.5f);
	World_Waypoint_Set(333, kSetBB12,       -34.0f,    0.0f,     33.0f);
	World_Waypoint_Set(334, kSetBB05,         3.0f, -60.30f,   -144.0f);
	World_Waypoint_Set(335, kSetBB12,       -50.0f,    0.0f,    212.0f);

	Actor_Put_In_Set(kActorBryant, kSetBB05);

	Actor_Set_Goal_Number(kActorBryant, 100);
}
예제 #25
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;
}
예제 #26
0
파일: kp05.cpp 프로젝트: 86400/scummvm
void ScriptKP05::PlayerWalkedIn() {
	if (Game_Flag_Query(577)) {
		Game_Flag_Reset(577);
	} else if (Game_Flag_Query(574)) {
		Loop_Actor_Walk_To_XYZ(0, -1110.0f, 0.0f, 932.0f, 0, 0, false, 0);
		Game_Flag_Reset(574);
	} else {
		Loop_Actor_Walk_To_XYZ(0, -846.0f, 0.0f, 972.0f, 0, 0, false, 0);
		Game_Flag_Query(419);
	}
	if (Actor_Query_Goal_Number(66) == 411) {
		Actor_Set_Goal_Number(66, 412);
	}
	if (Actor_Query_Goal_Number(1) == 450) {
		Scene_Exits_Disable();
		Actor_Face_Actor(1, 0, true);
		Actor_Says(1, 530, 15);
		Actor_Says(1, 540, 16);
		Actor_Face_Actor(0, 1, true);
		Player_Set_Combat_Mode(true);
		Actor_Says(0, 2200, 3);
		Actor_Says(1, 550, 17);
		Actor_Says(0, 2205, 3);
		Actor_Says(1, 560, 15);
		Actor_Says(1, 570, 16);
		Actor_Says(1, 580, 13);
		Actor_Says(0, 2210, 3);
		Actor_Says(1, 590, 13);
		Actor_Says(0, 2215, 3);
		Actor_Says(1, 600, 16);
		Actor_Says(1, 610, 15);
		Actor_Says(0, 2220, 3);
		Actor_Says(1, 620, 15);
		Actor_Says(1, 630, 17);
		Non_Player_Actor_Combat_Mode_On(1, 0, 1, 0, 9, 4, 7, 8, 0, -1, -1, 20, 240, 0);
	}
}
예제 #27
0
bool AIScriptClovis::Update() {
	if (Actor_Query_Goal_Number(kActorClovis) == kGoalClovisBB11PrepareToTalkToMcCoy) {
		Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11TalkToMcCoy);
		return true;
	}

	if (Global_Variable_Query(kVariableChapter) == 3
	 && Actor_Query_Goal_Number(kActorClovis) < 350
	) {
		Actor_Set_Goal_Number(kActorClovis, 350);
		return true;
	}

	if ( Global_Variable_Query(kVariableChapter) == 4
	 && !Game_Flag_Query(542)
	) {
		Game_Flag_Set(542);
		Actor_Set_Goal_Number(kActorClovis, 400);
		return true;
	}

	if (Global_Variable_Query(kVariableChapter) == 5
	 && Actor_Query_Goal_Number(kActorClovis) < 500
	) {
		Actor_Set_Goal_Number(kActorClovis, 500);
	}

	if (Actor_Query_Goal_Number(kActorClovis) == 511
	 && Game_Flag_Query(657)
	) {
		Actor_Set_Goal_Number(kActorClovis, 512);
	}

	if ( Game_Flag_Query(653)
	 && !Game_Flag_Query(696)
	 &&  Game_Flag_Query(697)
	) {
		Actor_Set_Goal_Number(kActorClovis, 517);
		Game_Flag_Set(696);
		return true;
	}
	return false;

}
예제 #28
0
파일: ma07.cpp 프로젝트: 86400/scummvm
bool ScriptMA07::ClickedOnExit(int exitId) {
	if (exitId == 0) {
		if (!Loop_Actor_Walk_To_XYZ(0, 104.0f, -162.0f, 56.0f, 12, 1, false, 0)) {
			if (Global_Variable_Query(1) == 4 && Game_Flag_Query(671)) {
				Actor_Set_Goal_Number(0, 400);
			} else {
				Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
				Ambient_Sounds_Remove_All_Looping_Sounds(1);
				Game_Flag_Set(57);
				Set_Enter(52, 52);
			}
		}
		return true;
	}
	if (exitId == 1) {
		if (!Loop_Actor_Walk_To_XYZ(0, -400.0f, -162.8f, 185.08f, 0, 1, false, 0)) {
			Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
			Ambient_Sounds_Remove_All_Looping_Sounds(1);
			Game_Flag_Set(672);
			Game_Flag_Reset(179);
			Game_Flag_Set(178);
			Set_Enter(68, 77);
		}
		return true;
	}
	if (exitId == 2) {
		if (!Loop_Actor_Walk_To_XYZ(0, 8.0f, -172.43f, 356.0f, 0, 1, false, 0)) {
			Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
			Ambient_Sounds_Remove_All_Looping_Sounds(1);
			Game_Flag_Set(357);
			Set_Enter(90, 103);
		}
		return true;
	}
	return false;
}
예제 #29
0
파일: nr07.cpp 프로젝트: 86400/scummvm
void ScriptNR07::PlayerWalkedIn() {
	Loop_Actor_Walk_To_XYZ(0, -110.0f, -73.5f, -169.0f, 0, 0, false, 0);
	if (Actor_Query_In_Set(3, 57)) {
		if (Game_Flag_Query(508)) {
			Actor_Modify_Friendliness_To_Other(3, 0, -2);
			Actor_Says(3, 530, 31);
		} else {
			Game_Flag_Set(508);
			if (!Actor_Clue_Query(3, 214)) {
				Actor_Modify_Friendliness_To_Other(3, 0, 5);
			} else if (Actor_Clue_Query(0, 216) || Actor_Clue_Query(0, 217)) {
				Actor_Modify_Friendliness_To_Other(3, 0, 10);
			}
			Actor_Says(3, 500, 30);
			Actor_Says(0, 3585, 14);
			Actor_Says(3, 510, 30);
			Actor_Start_Speech_Sample(0, 3590);
			Loop_Actor_Walk_To_XYZ(0, -112.0f, -73.0f, -89.0f, 525, 0, false, 0);
			Actor_Says(3, 520, 53);
		}
		Actor_Set_Goal_Number(25, 200);
	}
	//return false;
}
예제 #30
0
파일: ct04.cpp 프로젝트: AReim1982/scummvm
bool SceneScriptCT04::ClickedOnExit(int exitId) {
	if (exitId == 1) {
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -82.86f, -621.3f, 769.03f, 0, 1, false, 0)) {
			Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
			Ambient_Sounds_Remove_All_Looping_Sounds(1);
			if (!Actor_Query_Goal_Number(kActorTransient)) {
				Actor_Set_Goal_Number(kActorTransient, 2);
			}
			Game_Flag_Set(74);
			Set_Enter(28, 17);
		}
		return true;
	}
	if (exitId == 0) {
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -187.0f, -621.3f, 437.0f, 0, 1, false, 0)) {
			Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
			Ambient_Sounds_Remove_All_Looping_Sounds(1);
			Game_Flag_Set(73);
			Set_Enter(5, 15);
		}
		return true;
	}
	return false;
}