当前位置: 首页>>代码示例>>C++>>正文


C++ Global_Variable_Query函数代码示例

本文整理汇总了C++中Global_Variable_Query函数的典型用法代码示例。如果您正苦于以下问题:C++ Global_Variable_Query函数的具体用法?C++ Global_Variable_Query怎么用?C++ Global_Variable_Query使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Global_Variable_Query函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Game_Flag_Set

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;
}
开发者ID:86400,项目名称:scummvm,代码行数:34,代码来源:ma04.cpp

示例2: Actor_Set_Goal_Number

bool AIScriptMutant1::Update() {
	if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorMutant1) != 590) {
		if (Actor_Query_Which_Set_In(kActorMutant1) != Player_Query_Current_Set()) {
			Actor_Set_Goal_Number(kActorMutant1, 590);
		}

		return false;
	}

	if (Global_Variable_Query(kVariableChapter) != 4) {
		return false;
	}

	switch (Actor_Query_Goal_Number(kActorMutant1)) {
	case 400:
		if (!Game_Flag_Query(523) && Game_Flag_Query(524) == 1) {
			Actor_Set_Goal_Number(kActorMutant1, 401);
			Actor_Set_Goal_Number(kActorMutant2, 401);
			Actor_Set_Goal_Number(kActorMutant3, 401);
			Actor_Set_Targetable(kActorMutant1, 1);
			Actor_Set_Targetable(kActorMutant2, 1);
			Actor_Set_Targetable(kActorMutant3, 1);
			Game_Flag_Set(523);
		}
		break;

	case 401:
		if (Actor_Query_Which_Set_In(kActorMutant1) == Player_Query_Current_Set()
				&& (Actor_Query_Friendliness_To_Other(kActorMutant1, kActorMcCoy) < 30
				|| Actor_Query_Combat_Aggressiveness(70) >= 60)) {
			Actor_Set_Goal_Number(kActorMutant1, 410);
		}
		break;

	case 404:
		if (!Game_Flag_Query(630)) {
			Actor_Set_Goal_Number(kActorMutant1, 403);
		}
		break;

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

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

	if (Game_Flag_Query(630) == 1 && Actor_Query_Goal_Number(kActorMutant1) != 599) {
		Actor_Set_Goal_Number(kActorMutant1, 404);
	}

	return false;
}
开发者ID:dreammaster,项目名称:scummvm,代码行数:60,代码来源:mutant1.cpp

示例3: Actor_Face_Object

bool SceneScriptMA02::ClickedOn3DObject(const char *objectName, bool a2) {
	if (Object_Query_Click("E-ESPER", objectName)) {
		Actor_Face_Object(kActorMcCoy, "E-ESPER", true);
		Delay(1000);
		ESPER_Flag_To_Activate();
		return true;
	}
	if (Object_Query_Click("BAR-MAIN", objectName) && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, -29.0f, -140.4f, 298.0f, 36, 1, false, 0)) {
		Actor_Face_Object(kActorMcCoy, "BAR-MAIN", true);
		if (Global_Variable_Query(1) < 4) {
			Actor_Set_Goal_Number(kActorMaggie, 3);
		} else if (Global_Variable_Query(1) == 5 && Game_Flag_Query(653) && !Actor_Clue_Query(kActorMcCoy, kClueCrystalsCigarette)) {
			Overlay_Remove("MA02OVER");
			Item_Pickup_Spin_Effect(985, 480, 240);
			Actor_Voice_Over(1150, kActorVoiceOver);
			Actor_Voice_Over(1160, kActorVoiceOver);
			Actor_Voice_Over(1170, kActorVoiceOver);
			Actor_Voice_Over(1180, kActorVoiceOver);
			Actor_Voice_Over(1190, kActorVoiceOver);
			Actor_Voice_Over(1200, kActorVoiceOver);
			Actor_Clue_Acquire(kActorMcCoy, kClueCrystalsCigarette, 1, -1);
		} else {
			Actor_Says(kActorMcCoy, 8526, 0);
		}
		return true;
	}
	return false;
}
开发者ID:DrItanium,项目名称:scummvm,代码行数:28,代码来源:ma02.cpp

示例4: Setup_Scene_Information

void ScriptMA04::InitializeScene() {
	if (Game_Flag_Query(63)) {
		Setup_Scene_Information(-7199.0f, 953.97f, 1579.0f, 502);
		if (Global_Variable_Query(1) != 2 && Global_Variable_Query(1) != 3) {
			Scene_Loop_Start_Special(0, 0, 0);
		}
	} else if (Game_Flag_Query(35)) {
		Setup_Scene_Information(-7099.0f, 954.0f, 1866.0f, 502);
	} else if (Game_Flag_Query(647)) {
		Setup_Scene_Information(-7107.0f, 954.0f, 1742.0f, 502);
		Scene_Loop_Start_Special(0, 4, 0);
	} else {
		Setup_Scene_Information(-7143.0f, 954.0f, 1868.0f, 733);
	}
	Scene_Exit_Add_2D_Exit(0, 496, 0, 639, 354, 1);
	Scene_Exit_Add_2D_Exit(1, 33, 63, 113, 258, 0);
	Scene_Exit_Add_2D_Exit(2, 248, 98, 314, 284, 1);
	Scene_2D_Region_Add(0, 343, 97, 353, 190);
	Scene_2D_Region_Add(1, 0, 340, 116, 479);
	Ambient_Sounds_Add_Looping_Sound(408, 30, 0, 1);
	Ambient_Sounds_Add_Looping_Sound(103, 30, -80, 1);
	Ambient_Sounds_Add_Looping_Sound(104, 12, 0, 1);
	Ambient_Sounds_Add_Sound(72, 5, 30, 11, 11, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(73, 5, 30, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(74, 5, 30, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(375, 10, 60, 20, 20, 0, 0, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(376, 10, 60, 20, 20, 0, 0, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(87, 10, 60, 16, 16, -100, 0, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(68, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(69, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0);
	if (sub_402758()) {
		Ambient_Sounds_Add_Sound(403, 3, 3, 100, 100, 0, 0, 0, 0, 99, 0);
	}
	Scene_Loop_Set_Default(1);
}
开发者ID:86400,项目名称:scummvm,代码行数:35,代码来源:ma04.cpp

示例5: ADQ_Flush

void SceneScriptHF01::PlayerWalkedIn() {
	if (Game_Flag_Query(663)) {
		ADQ_Flush();
		ADQ_Add(kActorOfficerGrayford, 280, 3);
		Actor_Put_In_Set(kActorOfficerLeary, 37);
		Actor_Set_At_XYZ(kActorOfficerLeary, 8.2f, 8.0f, -346.67f, 1021);
		Actor_Put_In_Set(kActorOfficerGrayford, 37);
		Actor_Set_At_XYZ(kActorOfficerGrayford, 51.21f, 8.0f, -540.78f, 796);
		Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateUncover, true, kActorMcCoy, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 0, 100, 300, false);
		Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateUncover, true, kActorMcCoy, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 0, 100, 300, false);
	}
	if (!Game_Flag_Query(165) && Actor_Query_Goal_Number(kActorCrazylegs) != 2) {
		if (Actor_Clue_Query(kActorMcCoy, kCluePhoneCallLucy1) && Global_Variable_Query(kVariableAffectionTowards) == 3 && Actor_Query_Goal_Number(kActorLucy) != 599) {
			Actor_Put_In_Set(kActorLucy, 37);
			Actor_Set_At_XYZ(kActorLucy, -5.0f, 8.0f, -622.0f, 419);
			Actor_Set_Targetable(kActorLucy, true);
		} else if (Actor_Clue_Query(kActorMcCoy, kCluePhoneCallDektora1) && Global_Variable_Query(kVariableAffectionTowards) == 2 && Actor_Query_Goal_Number(kActorDektora) != 599) {
			Actor_Put_In_Set(kActorDektora, 37);
			Actor_Set_At_XYZ(kActorDektora, -5.0f, 8.0f, -622.0f, 419);
			Actor_Set_Targetable(kActorDektora, true);
		}
	}
	if (Game_Flag_Query(617)) {
		Actor_Set_Goal_Number(kActorSteele, 280);
		Game_Flag_Reset(617);
		//return true;
		return;
	}
	if (Game_Flag_Query(652)) {
		Game_Flag_Reset(652);
		Actor_Voice_Over(950, kActorVoiceOver);
		Actor_Voice_Over(960, kActorVoiceOver);
		Actor_Voice_Over(970, kActorVoiceOver);
		Actor_Voice_Over(980, kActorVoiceOver);
	} else if (!Game_Flag_Query(377) && Global_Variable_Query(kVariableChapter) < 4) {
		ADQ_Flush();
		ADQ_Add(kActorMurray, 0, 14);
		ADQ_Add(kActorMurray, 10, 3);
		ADQ_Add(kActorMia, 0, 3);
		Actor_Face_Actor(kActorMurray, kActorMia, true);
		ADQ_Add(kActorMurray, 20, 13);
		ADQ_Add(kActorMia, 10, 3);
		ADQ_Add(kActorMurray, 30, 3);
		ADQ_Add(kActorMia, 20, 3);
		Actor_Face_Heading(kActorMurray, 271, false);
		Game_Flag_Set(377);
	}
	if (Game_Flag_Query(311)) {
		Loop_Actor_Walk_To_XYZ(kActorMcCoy, 124.0f, 8.0f, -724.0f, 0, 1, false, 0);
	} else if (Game_Flag_Query(309)) {
		Loop_Actor_Walk_To_XYZ(kActorMcCoy, 406.0f, 8.0f, -717.0f, 0, 1, false, 0);
	} else if (!Game_Flag_Query(313)) {
		Loop_Actor_Walk_To_XYZ(kActorMcCoy, 100.0f, 0.0f, -300.0f, 0, 1, false, 0);
	}
	Game_Flag_Reset(311);
	Game_Flag_Reset(309);
	Game_Flag_Reset(313);
	//return false;
}
开发者ID:BenCastricum,项目名称:scummvm,代码行数:59,代码来源:hf01.cpp

示例6: Music_Play

void SceneScriptCT01::InitializeScene() {
	Music_Play(3, 28, 0, 2, -1, 1, 0);
	Game_Flag_Reset(kFlagArrivedFromSpinner1);
	if (Game_Flag_Query(kFlagCT02toCT01)) {
		Game_Flag_Reset(kFlagCT02toCT01);
		Setup_Scene_Information(-35.2f, -6.5f, 352.28f, 603);
	} else if (Game_Flag_Query(kFlagCT03toCT01)) {
		Game_Flag_Reset(kFlagCT03toCT01);
		Setup_Scene_Information(-311.0f, -6.5f, 710.0f, 878);
	} else if (Game_Flag_Query(kFlagCT12toCT01)) {
		Game_Flag_Reset(kFlagCT12toCT01);
		Setup_Scene_Information(-419.0f, -6.5f, 696.0f, 28);
		if (Global_Variable_Query(kVariableChapter) != 2
		 && Global_Variable_Query(kVariableChapter) != 3
		) {
			if (Game_Flag_Query(kFlagSpinnerAtCT01)) {
				Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kCT01LoopInshotFromCT12WithSpinner, false);
			} else {
				Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kCT01LoopInshotFromCT12NoSpinner, false);
			}
		}
	} else if (Game_Flag_Query(kFlagSpinnerAtCT01)) {
		Setup_Scene_Information(-530.0f, -6.5f, 241.0f, 506);
		Game_Flag_Set(kFlagArrivedFromSpinner1);
	} else {
		Setup_Scene_Information(-397.0f, -6.5f, 471.0f, 250);
	}
	Scene_Exit_Add_2D_Exit(kCT01ExitCT02, 290, 256, 360, 304, 1);
	if (Actor_Clue_Query(kActorMcCoy, kClueZubenRunsAway)) {
		Scene_Exit_Add_2D_Exit(kCT01ExitCT03, 571, 233, 639, 367, 1);
	}
	if (Game_Flag_Query(kFlagCT05WarehouseOpen)) {
		Scene_Exit_Add_2D_Exit(kCT01ExitCT12, 506, 400, 639, 479, 2);
	}
	if (Game_Flag_Query(kFlagSpinnerAtCT01)) {
		Scene_Exit_Add_2D_Exit(kCT01ExitSpinner, 0, 286, 158, 350, 2);
	}
	Ambient_Sounds_Add_Looping_Sound(54, 50, 1, 1);
	Ambient_Sounds_Add_Looping_Sound(55, 40, -100, 1);
	Ambient_Sounds_Add_Looping_Sound(56, 40, 100, 1);
	Ambient_Sounds_Add_Sound(61, 10, 30, 16, 20, 0, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(62, 10, 30, 16, 20, 0, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(63, 10, 30, 16, 20, 0, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(64, 10, 30, 16, 20, 0, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Speech_Sound(60,  0, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1);
	Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1);
	Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1);
	Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1);
	Ambient_Sounds_Add_Sound(68,  10, 40, 33, 50,    0,   0, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(69,  10, 40, 33, 50,    0,   0, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(375, 20, 40, 33, 50, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(376, 20, 40, 33, 50, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(377, 20, 40, 33, 50, -100, 100, -101, -101, 0, 0);
	if (Game_Flag_Query(kFlagSpinnerAtCT01)) {
		Scene_Loop_Set_Default(kCT01LoopMain);
	} else {
		Scene_Loop_Set_Default(kCT01LoopMainLoopNoSpinner);
	}
}
开发者ID:athrxx,项目名称:scummvm,代码行数:59,代码来源:ct01.cpp

示例7: ADQ_Flush

void ScriptHF01::PlayerWalkedIn() {
	if (Game_Flag_Query(663)) {
		ADQ_Flush();
		ADQ_Add(24, 280, 3);
		Actor_Put_In_Set(23, 37);
		Actor_Set_At_XYZ(23, 8.2f, 8.0f, -346.67f, 1021);
		Actor_Put_In_Set(24, 37);
		Actor_Set_At_XYZ(24, 51.21f, 8.0f, -540.78f, 796);
		Non_Player_Actor_Combat_Mode_On(23, 3, 1, 0, 4, 4, 7, 8, 0, 0, 0, 100, 300, 0);
		Non_Player_Actor_Combat_Mode_On(24, 3, 1, 0, 4, 4, 7, 8, 0, 0, 0, 100, 300, 0);
	}
	if (!Game_Flag_Query(165) && Actor_Query_Goal_Number(9) != 2) {
		if (Actor_Clue_Query(0, 141) && Global_Variable_Query(45) == 3 && Actor_Query_Goal_Number(6) != 599) {
			Actor_Put_In_Set(6, 37);
			Actor_Set_At_XYZ(6, -5.0f, 8.0f, -622.0f, 419);
			Actor_Set_Targetable(6, true);
		} else if (Actor_Clue_Query(0, 139) && Global_Variable_Query(45) == 2 && Actor_Query_Goal_Number(3) != 599) {
			Actor_Put_In_Set(3, 37);
			Actor_Set_At_XYZ(3, -5.0f, 8.0f, -622.0f, 419);
			Actor_Set_Targetable(3, true);
		}
	}
	if (Game_Flag_Query(617)) {
		Actor_Set_Goal_Number(1, 280);
		Game_Flag_Reset(617);
		//return true;
		return;
	}
	if (Game_Flag_Query(652)) {
		Game_Flag_Reset(652);
		Actor_Voice_Over(950, 99);
		Actor_Voice_Over(960, 99);
		Actor_Voice_Over(970, 99);
		Actor_Voice_Over(980, 99);
	} else if (!Game_Flag_Query(377) && Global_Variable_Query(1) < 4) {
		ADQ_Flush();
		ADQ_Add(31, 0, 14);
		ADQ_Add(31, 10, 3);
		ADQ_Add(22, 0, 3);
		Actor_Face_Actor(31, 22, true);
		ADQ_Add(31, 20, 13);
		ADQ_Add(22, 10, 3);
		ADQ_Add(31, 30, 3);
		ADQ_Add(22, 20, 3);
		Actor_Face_Heading(31, 271, false);
		Game_Flag_Set(377);
	}
	if (Game_Flag_Query(311)) {
		Loop_Actor_Walk_To_XYZ(0, 124.0f, 8.0f, -724.0f, 0, 1, false, 0);
	} else if (Game_Flag_Query(309)) {
		Loop_Actor_Walk_To_XYZ(0, 406.0f, 8.0f, -717.0f, 0, 1, false, 0);
	} else if (!Game_Flag_Query(313)) {
		Loop_Actor_Walk_To_XYZ(0, 100.0f, 0.0f, -300.0f, 0, 1, false, 0);
	}
	Game_Flag_Reset(311);
	Game_Flag_Reset(309);
	Game_Flag_Reset(313);
	//return false;
}
开发者ID:86400,项目名称:scummvm,代码行数:59,代码来源:hf01.cpp

示例8: Update

bool AIScriptFreeSlotB::Update() {
	if (Global_Variable_Query(kVariableChapter) > 5) {
		return false;
	}

	if (Global_Variable_Query(kVariableChapter) == 4) {
		switch (Actor_Query_Goal_Number(kActorFreeSlotB)) {
		case 300:
			Actor_Set_Goal_Number(kActorFreeSlotB, 301);
			Actor_Set_Targetable(kActorFreeSlotB, 1);
			break;

		case 301:
			if (Actor_Query_Which_Set_In(kActorFreeSlotB) == Player_Query_Current_Set()
					&& Actor_Query_Inch_Distance_From_Actor(kActorFreeSlotB, kActorMcCoy) <= 48) {
				Actor_Set_Goal_Number(kActorFreeSlotB, 302);
			}
			break;

		case 302:
			if (Actor_Query_Which_Set_In(kActorFreeSlotB) != Player_Query_Current_Set()) {
				Actor_Set_Goal_Number(kActorFreeSlotB, 301);
			}
			break;

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

		default:
			Actor_Set_Goal_Number(kActorFreeSlotB, 300);
			break;
		}

		return false;
	}
	if (Actor_Query_Goal_Number(kActorFreeSlotB) < 400) {
		AI_Movement_Track_Flush(kActorFreeSlotB);
		Actor_Set_Goal_Number(kActorFreeSlotB, 400);
		return true;
	} else {
		if (Actor_Query_Goal_Number(kActorFreeSlotB) != 405 || Actor_Query_Which_Set_In(kActorMcCoy) != kSetKP02) {
			if (Actor_Query_Goal_Number(kActorFreeSlotB) == 599) {
				if (Actor_Query_Which_Set_In(kActorFreeSlotB) != Player_Query_Current_Set()) {
					Non_Player_Actor_Combat_Mode_Off(kActorFreeSlotB);
					Actor_Set_Goal_Number(kActorFreeSlotB, 400);
					return true;
				}
			}
			return false;
		}
		Actor_Set_Goal_Number(kActorFreeSlotB, 406);
		Actor_Set_Targetable(kActorFreeSlotB, 1);
		return true;
	}
}
开发者ID:BenCastricum,项目名称:scummvm,代码行数:58,代码来源:free_slot_b.cpp

示例9:

int SceneScriptUG05::sub_4021B0() {
	if (Global_Variable_Query(45) == 2 && Actor_Query_Goal_Number(kActorDektora) != 599) {
		return kActorDektora;
	}
	if (Global_Variable_Query(45) == 3 && Actor_Query_Goal_Number(kActorLucy) != 599) {
		return kActorLucy;
	}
	return -1;
}
开发者ID:AReim1982,项目名称:scummvm,代码行数:9,代码来源:ug05.cpp

示例10:

int ScriptUG05::sub_4021B0() {
    if (Global_Variable_Query(45) == 2 && Actor_Query_Goal_Number(3) != 599) {
        return 3;
    }
    if (Global_Variable_Query(45) == 3 && Actor_Query_Goal_Number(6) != 599) {
        return 6;
    }
    return -1;
}
开发者ID:86400,项目名称:scummvm,代码行数:9,代码来源:ug05.cpp

示例11:

void ScriptUG09::PlayerWalkedOut() {
	if (Global_Variable_Query(1) == 4 && Global_Variable_Query(1) != 5) {
		Game_Flag_Reset(630);
	}
	if (Game_Flag_Query(432)) {
		Game_Flag_Set(176);
		Game_Flag_Reset(259);
	}
}
开发者ID:86400,项目名称:scummvm,代码行数:9,代码来源:ug09.cpp

示例12: Game_Flag_Set

void AIScriptLucy::checkCombat() {
	Game_Flag_Set(701);
	if (Actor_Query_In_Set(kActorLucy, kSetHF01) == 1
			&& Global_Variable_Query(kVariableChapter) == 5
			&& Actor_Query_Goal_Number(kActorLucy) != 450) {
		if (Global_Variable_Query(kVariableAffectionTowards) == 3) {
			Global_Variable_Set(kVariableAffectionTowards, 0);
		}
		Actor_Set_Goal_Number(kActorLucy, 450);
		Non_Player_Actor_Combat_Mode_On(kActorLucy, kActorCombatStateIdle, false, kActorMcCoy, 4, kAnimationModeIdle, kAnimationModeWalk, kAnimationModeRun, -1, 0, 0, 10, 300, false);
	}
}
开发者ID:BenCastricum,项目名称:scummvm,代码行数:12,代码来源:lucy.cpp

示例13: Actor_Set_Goal_Number

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;
}
开发者ID:BenCastricum,项目名称:scummvm,代码行数:53,代码来源:lucy.cpp

示例14: Setup_Scene_Information

void ScriptHC03::InitializeScene() {
	if (Game_Flag_Query(318)) {
		Setup_Scene_Information(656.0f, 1.61f, -95.0f, 497);
		Game_Flag_Set(388);
		Game_Flag_Reset(318);
	} else {
		Setup_Scene_Information(607.0f, 0.14f, 13.0f, 57);
		Game_Flag_Reset(386);
	}
	Scene_Exit_Add_2D_Exit(0, 0, 0, 30, 479, 3);
	if (Game_Flag_Query(403) || Global_Variable_Query(1) > 3) {
		Item_Remove_From_World(121);
		Game_Flag_Set(403);
		Scene_Exit_Add_2D_Exit(1, 400, 275, 515, 375, 2);
	}
	Ambient_Sounds_Add_Looping_Sound(103, 50, 50, 0);
	Ambient_Sounds_Add_Looping_Sound(241, 50, 50, 0);
	Ambient_Sounds_Add_Sound(242, 3, 30, 16, 16, -100, -70, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(243, 3, 30, 16, 16, -100, -70, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(244, 3, 30, 16, 16, -100, -70, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(245, 3, 30, 16, 16, -100, -70, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(246, 3, 30, 16, 16, -100, -70, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(247, 3, 30, 16, 16, -100, -70, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(248, 3, 30, 16, 16, -100, -70, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(249, 3, 30, 16, 16, -100, -70, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(238, 3, 50, 25, 25, -100, -70, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(240, 3, 50, 33, 33, -100, -70, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(181, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(182, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(183, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(184, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(185, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(186, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(188, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(189, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(190, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(191, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(192, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(193, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(194, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	Ambient_Sounds_Add_Sound(195, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
	if (Game_Flag_Query(388)) {
		Scene_Loop_Set_Default(6);
	} else if (Game_Flag_Query(403) || Global_Variable_Query(1) > 3) {
		Scene_Loop_Set_Default(3);
	} else {
		Scene_Loop_Set_Default(0);
	}
}
开发者ID:86400,项目名称:scummvm,代码行数:49,代码来源:hc03.cpp

示例15: switch

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;
}
开发者ID:athrxx,项目名称:scummvm,代码行数:48,代码来源:mutant2.cpp


注:本文中的Global_Variable_Query函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。