コード例 #1
0
ファイル: tyrell_guard.cpp プロジェクト: BenCastricum/scummvm
void AIScriptTyrellGuard::TimerExpired(int timer) {
	switch (timer) {
	case 0:
		AI_Countdown_Timer_Reset(kActorTyrellGuard, 0);
		if (Actor_Query_Which_Set_In(kActorMcCoy) == kSetTB02_TB03) {
			Actor_Set_Goal_Number(kActorTyrellGuard, 301);
		}
		break;
	case 1:
		AI_Countdown_Timer_Reset(kActorTyrellGuard, 1);
		Actor_Set_Goal_Number(kActorTyrellGuard, 303);
		break;
	}
}
コード例 #2
0
ファイル: bullet_bob.cpp プロジェクト: dreammaster/scummvm
bool AIScriptBulletBob::Update() {
	if (Game_Flag_Query(kFlagRC04McCoyShotBob)
	 && Actor_Query_Goal_Number(kActorBulletBob) != kGoalBulletBobDead
	) {
		Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobDead);
	}

	if ( Player_Query_Combat_Mode()
	 &&  Player_Query_Current_Scene() == kSceneRC04
	 && !Game_Flag_Query(kFlagRC04McCoyCombatMode)
	 &&  Global_Variable_Query(kVariableChapter) < 4
	) {
		AI_Countdown_Timer_Reset(kActorBulletBob, 2);
		AI_Countdown_Timer_Start(kActorBulletBob, 2, 10);
		Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobWarningMcCoy);
		Actor_Modify_Friendliness_To_Other(kActorBulletBob, kActorMcCoy, -15);
		Game_Flag_Set(kFlagRC04McCoyCombatMode);
	} else if ( Actor_Query_Goal_Number(kActorBulletBob) == kGoalBulletBobWarningMcCoy
	        && !Player_Query_Combat_Mode()
	) {
		AI_Countdown_Timer_Reset(kActorBulletBob, 2);
		Game_Flag_Reset(kFlagRC04McCoyCombatMode);
		Game_Flag_Set(kFlagRC04McCoyWarned);
		Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobDefault);
	}

	if ( Actor_Query_Goal_Number(kActorBulletBob) == kGoalBulletBobShootMcCoy
	 && !Game_Flag_Query(kFlagRC04BobShootMcCoy)
	 &&  _animationState == 0
	) {
		Actor_Face_Heading(kActorBulletBob, 208, false);
		_animationFrame = 0;
		_animationState = 2;
		Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobShotMcCoy);
		Game_Flag_Set(kFlagRC04BobShootMcCoy);
		return true;
	}

	if (Game_Flag_Query(kFlagRC04McCoyWarned)
	 && Player_Query_Combat_Mode()
	 && Actor_Query_Goal_Number(kActorBulletBob) != kGoalBulletBobDead
	) {
		Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobShootMcCoy);
		return true;
	}

	return false;
}
コード例 #3
0
ファイル: gaff.cpp プロジェクト: fingolfin/scummvm
void AIScriptGaff::TimerExpired(int timer) {
	if (timer == kActorTimerAIScriptCustomTask0) {
		AI_Countdown_Timer_Reset(kActorGaff, kActorTimerAIScriptCustomTask0);
		Actor_Set_Goal_Number(kActorGaff, kGoalGaffMA07TalkToMcCoy);
	}
	//return false;
}
コード例 #4
0
void AIScriptGenericWalkerC::TimerExpired(int timer) {
	if (timer == 2) {
		AI_Countdown_Timer_Reset(kActorGenwalkerC, 2);
		Game_Flag_Reset(kFlagGenericWalkerWaiting);
		return;// true;
	}
	//return false;
}
コード例 #5
0
ファイル: bullet_bob.cpp プロジェクト: dreammaster/scummvm
void AIScriptBulletBob::TimerExpired(int timer) {
	if (timer == 2
	 && Actor_Query_Goal_Number(kActorBulletBob) == kGoalBulletBobWarningMcCoy
	) {
		Actor_Set_Goal_Number(kActorBulletBob, kGoalBulletBobShootMcCoy);
		AI_Countdown_Timer_Reset(kActorBulletBob, 2);
		return; //true;
	}
	return; //false;
}
コード例 #6
0
ファイル: lucy.cpp プロジェクト: BenCastricum/scummvm
void AIScriptLucy::TimerExpired(int timer) {
	AI_Countdown_Timer_Reset(kActorLucy, 0);
	if (!timer && Actor_Query_Goal_Number(kActorLucy) == 205) {
		if (Player_Query_Current_Scene() == 36) {
			AI_Countdown_Timer_Start(kActorLucy, 0, 20);
		} else {
			Actor_Set_Goal_Number(kActorLucy, 200);
		}
	}
}
コード例 #7
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;
}
コード例 #8
0
ファイル: gaff.cpp プロジェクト: fingolfin/scummvm
void AIScriptGaff::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) {
	// It is impossible to triger this as player has no control at this moment
	if (otherActorId == kActorMcCoy
	 && combatMode == 1
	 && Global_Variable_Query(kVariableChapter) == 4
	 && Actor_Query_In_Set(kActorMcCoy, kSetMA07)
	 && Actor_Query_Goal_Number(kActorGaff) == kGoalGaffMA07Wait
	) {
		AI_Countdown_Timer_Reset(kActorGaff, kActorTimerAIScriptCustomTask0);
		Actor_Set_Goal_Number(kActorGaff, kGoalGaffMA07ShootMcCoy);
	}
	// return false;
}
コード例 #9
0
ファイル: tyrell_guard.cpp プロジェクト: BenCastricum/scummvm
bool AIScriptTyrellGuard::GoalChanged(int currentGoalNumber, int newGoalNumber) {
	switch (newGoalNumber) {
	case 300:
		if (currentGoalNumber != newGoalNumber) {
			Actor_Change_Animation_Mode(kActorTyrellGuard, 55);
			AI_Countdown_Timer_Start(kActorTyrellGuard, 0, 30);
		}
		return true;
	case 301:
		Actor_Change_Animation_Mode(kActorTyrellGuard, kAnimationModeIdle);
		Delay(1000);
		Actor_Says(kActorTyrellGuard, 320, 14);
		Actor_Change_Animation_Mode(kActorTyrellGuard, 50);
		Ambient_Sounds_Play_Sound(590, 100, 0, 0, 0);
		Delay(1000);
		Actor_Force_Stop_Walking(kActorMcCoy);
		Actor_Set_Goal_Number(kActorMcCoy, 500);
		return true;
	case 302:
		AI_Countdown_Timer_Reset(kActorTyrellGuard, 0);
		Actor_Says(kActorTyrellGuard, 310, 14);
		AI_Countdown_Timer_Start(kActorTyrellGuard, 1, 20);
		return true;
	case 303:
		Actor_Change_Animation_Mode(kActorTyrellGuard, 50);
		Ambient_Sounds_Play_Sound(590, 100, 0, 0, 0);
		Delay(1000);
		Actor_Force_Stop_Walking(kActorMcCoy);
		Actor_Set_Goal_Number(kActorMcCoy, 500);
		return true;
	case 304:
		AI_Countdown_Timer_Reset(kActorTyrellGuard, 1);
		return true;
	}
	return false;
}
コード例 #10
0
ファイル: sadik.cpp プロジェクト: dreammaster/scummvm
void AIScriptSadik::TimerExpired(int timer) {
	if (timer == 0) {
		AI_Countdown_Timer_Reset(kActorSadik, 0);

		switch (Actor_Query_Goal_Number(kActorSadik)) {
		case 302:
			Actor_Set_Goal_Number(kActorSadik, 305);
			break;

		case 303:
			Actor_Set_Goal_Number(kActorSadik, 305);
			break;

		case 307:
			Actor_Set_Goal_Number(kActorSadik, 308);
			break;
		}
	}
}
コード例 #11
0
ファイル: sadik.cpp プロジェクト: fingolfin/scummvm
void AIScriptSadik::TimerExpired(int timer) {
	if (timer == kActorTimerAIScriptCustomTask0) {
		AI_Countdown_Timer_Reset(kActorSadik, kActorTimerAIScriptCustomTask0);

		// goals 303, 304 and 305 are never set,  cut out part of game?
		switch (Actor_Query_Goal_Number(kActorSadik)) {
		case kGoalSadikUG18Decide:
			Actor_Set_Goal_Number(kActorSadik, 305);
			break;

		case 303:
			Actor_Set_Goal_Number(kActorSadik, 305);
			break;

		case kGoalSadikUG18PrepareShootMcCoy:
			Actor_Set_Goal_Number(kActorSadik, kGoalSadikUG18ShootMcCoy);
			break;
		}
	}
}
コード例 #12
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;
}
コード例 #13
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;
}
コード例 #14
0
ファイル: sadik.cpp プロジェクト: fingolfin/scummvm
bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
	switch (newGoalNumber) {
	case kGoalSadikDefaut:
		AI_Movement_Track_Flush(kActorSadik);
		AI_Movement_Track_Append(kActorSadik, 33, 0);
		AI_Movement_Track_Repeat(kActorSadik);
		return true;

	case kGoalSadikRunFromBB09:
		AI_Movement_Track_Flush(kActorSadik);
		AI_Movement_Track_Append_Run(kActorSadik, 131, 0);
		AI_Movement_Track_Append_Run(kActorSadik, 132, 0);
		AI_Movement_Track_Append_Run(kActorSadik, 133, 0);
		AI_Movement_Track_Repeat(kActorSadik);
		return true;

	case kGoalSadikBB11Wait:
		AI_Movement_Track_Flush(kActorSadik);
		AI_Movement_Track_Append(kActorSadik, 313, 0);
		AI_Movement_Track_Repeat(kActorSadik);
		Game_Flag_Set(kFlagBB11SadikFight);
		return true;

	case kGoalSadikBB11ThrowMcCoy:
		Actor_Set_Immunity_To_Obstacles(kActorSadik, true);
		Actor_Face_Heading(kActorSadik, kActorMcCoy, kActorMcCoy);
		_animationState = 32;
		_animationFrame = -1;
		Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
		return true;

	case kGoalSadikBB11CatchMcCoy:
		Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyBB11GetUp);
		AI_Movement_Track_Flush(kActorSadik);
		AI_Movement_Track_Append(kActorSadik, 314, 0);
		AI_Movement_Track_Append_Run(kActorSadik, 317, 0);
		AI_Movement_Track_Repeat(kActorSadik);
		return true;

	case kGoalSadikBB11KnockOutMcCoy:
		Actor_Change_Animation_Mode(kActorSadik, 62);
		return true;

	case kGoalSadikBB11KickMcCoy:
		Actor_Face_Heading(kActorSadik, 100, false);
		Actor_Change_Animation_Mode(kActorSadik, 63);
		Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11WalkToMcCoy);
		Actor_Set_Immunity_To_Obstacles(kActorSadik, false);
		return true;

	case kGoalSadikBB11TalkWithClovis:
		_nextSoundId = -1; // changed from original (0) to be more clear that this is an invalid sfx id
		return false;

	case 200:
		Actor_Put_In_Set(kActorSadik, kSetFreeSlotA);
		Actor_Set_At_Waypoint(kActorSadik, 33, 0);
		Actor_Set_Goal_Number(kActorMcCoy, 199);
		return true;

	case kGoalSadikUG18Wait:
		Actor_Put_In_Set(kActorSadik, kSetUG18);
		Actor_Set_At_XYZ(kActorSadik, 111.89f, 0.0f, 408.42f, 0);
		Actor_Change_Animation_Mode(kActorSadik, 4);
		return true;

	case kGoalSadikUG18Move:
		Actor_Set_Targetable(kActorSadik, true);
		World_Waypoint_Set(436, kSetUG18, -356.11f, 0.0f, 652.42f);
		AI_Movement_Track_Flush(kActorSadik);
		AI_Movement_Track_Append_Run(kActorSadik, 436, 0);
		AI_Movement_Track_Repeat(kActorSadik);
		return true;

	case kGoalSadikUG18Decide:
		Actor_Set_Targetable(kActorSadik, false);
		return true;

	// goals 303, 304 and 305 are never set,  cut out part of game?
	case 303:
		AI_Countdown_Timer_Reset(kActorSadik, kActorTimerAIScriptCustomTask0);
		AI_Countdown_Timer_Start(kActorSadik, kActorTimerAIScriptCustomTask0, 5);
		return true;

	case 304:
		Actor_Set_Targetable(kActorSadik, false);
		AI_Countdown_Timer_Reset(kActorSadik, kActorTimerAIScriptCustomTask0);
		return true;

	case 305:
	case kGoalSadikUG18WillShootMcCoy:
	case kGoalSadikUG18Leave:
		return true;

	case kGoalSadikUG18PrepareShootMcCoy:
		Sound_Play(kSfxLGCAL1, 100, 0, 0, 50);
		AI_Countdown_Timer_Start(kActorSadik, kActorTimerAIScriptCustomTask0, 2);
		return true;

	case kGoalSadikUG18ShootMcCoy:
		if (Player_Query_Current_Scene() == kSceneUG18) {
			Actor_Force_Stop_Walking(kActorMcCoy);
			Actor_Change_Animation_Mode(kActorSadik, kAnimationModeCombatAttack);
			Sound_Play(kSfxLGCAL1, 100, 0, 0, 50);
			Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
			Actor_Retired_Here(kActorMcCoy, 6, 6, true, -1);
		}
		return true;

	case 309:
		AI_Countdown_Timer_Reset(kActorSadik, kActorTimerAIScriptCustomTask0);
		return true;

	case 400:
		Actor_Set_Goal_Number(kActorSadik, 410);
		return true;

	case 410:
		if (Game_Flag_Query(kFlagMcCoyIsHelpingReplicants) == 1) {
			Actor_Set_Goal_Number(kActorSadik, 414);
		} else {
			Actor_Set_Goal_Number(kActorSadik, 411);
		}
		return true;

	case 411:
		Actor_Put_In_Set(kActorSadik, kSetKP05_KP06);
		Actor_Set_At_XYZ(kActorSadik, -1134.0f, 0.0f, 73.45f, 398);
		Actor_Set_Goal_Number(kActorClovis, kGoalClovisKP07Wait);
		Actor_Set_Goal_Number(kActorMaggie, kGoalMaggieKP05Wait);
		return true;

	case 412:
		Actor_Says(kActorSadik, 60, 3);
		Actor_Says(kActorMcCoy, 2240, 3);
		Actor_Says(kActorSadik, 70, 3);
		Actor_Says(kActorSadik, 80, 3);
		Actor_Says(kActorMcCoy, 2245, 3);
		Actor_Says(kActorSadik, 90, 3);
		Actor_Says(kActorSadik, 100, 3);
		Actor_Says(kActorMcCoy, 2250, 3);
		Actor_Set_Goal_Number(kActorSadik, 413);
		return true;

	case 413:
		Loop_Actor_Walk_To_XYZ(kActorSadik, -1062.0f, 0.0f, 219.0f, 0, false, true, false);
		Actor_Set_Targetable(kActorSadik, true);
		Non_Player_Actor_Combat_Mode_On(kActorSadik, kActorCombatStateIdle, true, kActorMcCoy, 9, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, -1, -1, 15, 300, false);
		Actor_Set_Goal_Number(kActorSadik, 450);
		return true;

	case 414:
		Actor_Put_In_Set(kActorSadik, kSetKP05_KP06);
		Actor_Set_At_XYZ(kActorSadik, -961.0f, 0.0f, -778.0f, 150);
		Actor_Set_Targetable(kActorSadik, true);
		return true;

	case 415:
		Actor_Says(kActorSadik, 110, kAnimationModeTalk);
		Actor_Says(kActorMcCoy, 2290, kAnimationModeTalk);
		Actor_Says(kActorSadik, 310, kAnimationModeTalk);
		Actor_Says(kActorMcCoy, 2300, kAnimationModeTalk);
		if (Game_Flag_Query(kFlagSadikIsReplicant)) {
			Actor_Says(kActorSadik, 180, kAnimationModeTalk);
			Actor_Says(kActorSadik, 190, kAnimationModeTalk);
			Actor_Says(kActorMcCoy, 2310, kAnimationModeTalk);
			Actor_Says(kActorSadik, 200, kAnimationModeTalk);
		} else {
			Actor_Says(kActorSadik, 140, kAnimationModeTalk);
			Actor_Says(kActorSadik, 150, kAnimationModeTalk);
			Actor_Says(kActorMcCoy, 2305, kAnimationModeTalk);
			Actor_Says(kActorSadik, 160, kAnimationModeTalk);
			Actor_Says(kActorSadik, 170, kAnimationModeTalk);
		}
		Actor_Says(kActorMcCoy, 2315, kAnimationModeTalk);
		Actor_Says(kActorSadik, 210, kAnimationModeTalk);
		Actor_Says(kActorSadik, 220, kAnimationModeTalk);
		Actor_Says(kActorSadik, 230, kAnimationModeTalk);
		Actor_Says(kActorSadik, 240, kAnimationModeTalk);
		Actor_Says(kActorSadik, 250, kAnimationModeTalk);
		Actor_Says(kActorSadik, 260, kAnimationModeTalk);
		Actor_Set_Goal_Number(kActorSadik, kGoalSadikUG18NeedsReactorCoreFromMcCoy);
		return true;

	case kGoalSadikUG18NeedsReactorCoreFromMcCoy:
		Loop_Actor_Walk_To_XYZ(kActorSadik, -961.0f, 0.0f, -778.0f, 0, false, false, false);
		Actor_Face_Heading(kActorSadik, 150, false);
		return true;

	case 417:
		Actor_Face_Actor(kActorSadik, kActorMcCoy, true);
		Actor_Says(kActorSadik, 320, kAnimationModeTalk);
		Loop_Actor_Walk_To_XYZ(kActorSadik, -857.0f, 0.0f, -703.0f, 0, false, true, false);
		Actor_Says(kActorMcCoy, 2330, kAnimationModeTalk);
		Actor_Says(kActorSadik, 330, kAnimationModeTalk);
		Actor_Says(kActorMcCoy, 2335, kAnimationModeTalk);
		Actor_Says(kActorSadik, 340, kAnimationModeTalk);
		Actor_Set_Goal_Number(kActorSadik, kGoalSadikUG18NeedsReactorCoreFromMcCoy);
		return true;

	case 418:
		Game_Flag_Reset(kFlagMcCoyIsHelpingReplicants);
		Actor_Set_Goal_Number(kActorClovis, kGoalClovisKP07LayDown);
		Non_Player_Actor_Combat_Mode_On(kActorSadik, kActorCombatStateIdle, true, kActorMcCoy, 9, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, -1, -1, 15, 300, false);
		return true;

	case 419:
		Actor_Put_In_Set(kActorSadik, kSetKP07);
		Actor_Set_At_XYZ(kActorSadik, -12.0f, -41.58f, 72.0f, 0);
		return true;

	case 420:
	case 450:
		return true;
	}
	return false;
}
コード例 #15
0
ファイル: sadik.cpp プロジェクト: dreammaster/scummvm
bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
	switch (newGoalNumber) {
	case kGoalSadikDefaut:
		AI_Movement_Track_Flush(kActorSadik);
		AI_Movement_Track_Append(kActorSadik, 33, 0);
		AI_Movement_Track_Repeat(kActorSadik);
		return true;

	case kGoalSadikRunFromBB09:
		AI_Movement_Track_Flush(kActorSadik);
		AI_Movement_Track_Append_Run(kActorSadik, 131, 0);
		AI_Movement_Track_Append_Run(kActorSadik, 132, 0);
		AI_Movement_Track_Append_Run(kActorSadik, 133, 0);
		AI_Movement_Track_Repeat(kActorSadik);
		return true;

	case kGoalSadikBB11Wait:
		AI_Movement_Track_Flush(kActorSadik);
		AI_Movement_Track_Append(kActorSadik, 313, 0);
		AI_Movement_Track_Repeat(kActorSadik);
		Game_Flag_Set(kFlagBB11SadikFight);
		return true;

	case kGoalSadikBB11ThrowMcCoy:
		Actor_Set_Immunity_To_Obstacles(kActorSadik, true);
		Actor_Face_Heading(kActorSadik, kActorMcCoy, kActorMcCoy);
		_animationState = 32;
		_animationFrame = -1;
		Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
		return true;

	case kGoalSadikBB11CatchMcCoy:
		Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyBB11GetUp);
		AI_Movement_Track_Flush(kActorSadik);
		AI_Movement_Track_Append(kActorSadik, 314, 0);
		AI_Movement_Track_Append_Run(kActorSadik, 317, 0);
		AI_Movement_Track_Repeat(kActorSadik);
		return true;

	case kGoalSadikBB11KnockOutMcCoy:
		Actor_Change_Animation_Mode(kActorSadik, 62);
		return true;

	case kGoalSadikBB11KickMcCoy:
		Actor_Face_Heading(kActorSadik, 100, false);
		Actor_Change_Animation_Mode(kActorSadik, 63);
		Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11WalkToMcCoy);
		Actor_Set_Immunity_To_Obstacles(kActorSadik, false);
		return true;

	case kGoalSadikBB11TalkWithClovis:
		_var1 = 0;
		return false;

	case 200:
		Actor_Put_In_Set(kActorSadik, kSetFreeSlotA);
		Actor_Set_At_Waypoint(kActorSadik, 33, 0);
		Actor_Set_Goal_Number(kActorMcCoy, 199);
		return true;

	case 300:
		Actor_Put_In_Set(kActorSadik, kSetUG18);
		Actor_Set_At_XYZ(kActorSadik, 111.89f, 0.0f, 408.42f, 0);
		Actor_Change_Animation_Mode(kActorSadik, 4);
		return true;

	case 301:
		Actor_Set_Targetable(kActorSadik, true);
		World_Waypoint_Set(436, 89, -356.11f, 0.0f, 652.42f);
		AI_Movement_Track_Flush(kActorSadik);
		AI_Movement_Track_Append_Run(kActorSadik, 436, 0);
		AI_Movement_Track_Repeat(kActorSadik);
		return true;

	case 302:
		Actor_Set_Targetable(kActorSadik, false);
		return true;

	case 303:
		AI_Countdown_Timer_Reset(kActorSadik, 0);
		AI_Countdown_Timer_Start(kActorSadik, 0, 5);
		return true;

	case 304:
		Actor_Set_Targetable(kActorSadik, false);
		AI_Countdown_Timer_Reset(kActorSadik, 0);
		return true;

	case 305:
	case 306:
	case 310:
		return true;

	case 307:
		Sound_Play(12, 100, 0, 0, 50);
		AI_Countdown_Timer_Start(kActorSadik, 0, 2);
		return true;

	case 308:
		if (Player_Query_Current_Scene() == kSceneUG18) {
			Actor_Force_Stop_Walking(kActorMcCoy);
			Actor_Change_Animation_Mode(kActorSadik, kAnimationModeCombatAttack);
			Sound_Play(12, 100, 0, 0, 50);
			Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
			Actor_Retired_Here(kActorMcCoy, 6, 6, true, -1);
		}
		return true;

	case 309:
		AI_Countdown_Timer_Reset(kActorSadik, 0);
		return true;

	case 400:
		Actor_Set_Goal_Number(kActorSadik, 410);
		return true;

	case 410:
		if (Game_Flag_Query(653) == 1) {
			Actor_Set_Goal_Number(kActorSadik, 414);
		} else {
			Actor_Set_Goal_Number(kActorSadik, 411);
		}
		return true;

	case 411:
		Actor_Put_In_Set(kActorSadik, kSetKP05_KP06);
		Actor_Set_At_XYZ(kActorSadik, -1134.0f, 0.0f, 73.45f, 398);
		Actor_Set_Goal_Number(kActorClovis, 513);
		Actor_Set_Goal_Number(kActorMaggie, 411);
		return true;

	case 412:
		Actor_Says(kActorSadik, 60, 3);
		Actor_Says(kActorMcCoy, 2240, 3);
		Actor_Says(kActorSadik, 70, 3);
		Actor_Says(kActorSadik, 80, 3);
		Actor_Says(kActorMcCoy, 2245, 3);
		Actor_Says(kActorSadik, 90, 3);
		Actor_Says(kActorSadik, 100, 3);
		Actor_Says(kActorMcCoy, 2250, 3);
		Actor_Set_Goal_Number(kActorSadik, 413);
		return true;

	case 413:
		Loop_Actor_Walk_To_XYZ(kActorSadik, -1062.0f, 0.0f, 219.0f, 0, false, true, 0);
		Actor_Set_Targetable(kActorSadik, true);
		Non_Player_Actor_Combat_Mode_On(kActorSadik, kActorCombatStateIdle, true, kActorMcCoy, 9, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, -1, -1, 15, 300, false);
		Actor_Set_Goal_Number(kActorSadik, 450);
		return true;

	case 414:
		Actor_Put_In_Set(kActorSadik, kSetKP05_KP06);
		Actor_Set_At_XYZ(kActorSadik, -961.0f, 0.0f, -778.0f, 150);
		Actor_Set_Targetable(kActorSadik, true);
		return true;

	case 415:
		Actor_Says(kActorSadik, 110, kAnimationModeTalk);
		Actor_Says(kActorMcCoy, 2290, kAnimationModeTalk);
		Actor_Says(kActorSadik, 310, kAnimationModeTalk);
		Actor_Says(kActorMcCoy, 2300, kAnimationModeTalk);
		if (Game_Flag_Query(kFlagSadikIsReplicant)) {
			Actor_Says(kActorSadik, 180, kAnimationModeTalk);
			Actor_Says(kActorSadik, 190, kAnimationModeTalk);
			Actor_Says(kActorMcCoy, 2310, kAnimationModeTalk);
			Actor_Says(kActorSadik, 200, kAnimationModeTalk);
		} else {
			Actor_Says(kActorSadik, 140, kAnimationModeTalk);
			Actor_Says(kActorSadik, 150, kAnimationModeTalk);
			Actor_Says(kActorMcCoy, 2305, kAnimationModeTalk);
			Actor_Says(kActorSadik, 160, kAnimationModeTalk);
			Actor_Says(kActorSadik, 170, kAnimationModeTalk);
		}
		Actor_Says(kActorMcCoy, 2315, kAnimationModeTalk);
		Actor_Says(kActorSadik, 210, kAnimationModeTalk);
		Actor_Says(kActorSadik, 220, kAnimationModeTalk);
		Actor_Says(kActorSadik, 230, kAnimationModeTalk);
		Actor_Says(kActorSadik, 240, kAnimationModeTalk);
		Actor_Says(kActorSadik, 250, kAnimationModeTalk);
		Actor_Says(kActorSadik, 260, kAnimationModeTalk);
		Actor_Set_Goal_Number(kActorSadik, 416);
		return true;

	case 416:
		Loop_Actor_Walk_To_XYZ(kActorSadik, -961.0f, 0.0f, -778.0f, 0, false, false, 0);
		Actor_Face_Heading(kActorSadik, 150, false);
		return true;

	case 417:
		Actor_Face_Actor(kActorSadik, kActorMcCoy, true);
		Actor_Says(kActorSadik, 320, kAnimationModeTalk);
		Loop_Actor_Walk_To_XYZ(kActorSadik, -857.0f, 0.0f, -703.0f, 0, false, true, 0);
		Actor_Says(kActorMcCoy, 2330, kAnimationModeTalk);
		Actor_Says(kActorSadik, 330, kAnimationModeTalk);
		Actor_Says(kActorMcCoy, 2335, kAnimationModeTalk);
		Actor_Says(kActorSadik, 340, kAnimationModeTalk);
		Actor_Set_Goal_Number(kActorSadik, 416);
		return true;

	case 418:
		Game_Flag_Reset(653);
		Actor_Set_Goal_Number(kActorClovis, 518);
		Non_Player_Actor_Combat_Mode_On(kActorSadik, kActorCombatStateIdle, true, kActorMcCoy, 9, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, -1, -1, 15, 300, false);
		return true;

	case 419:
		Actor_Put_In_Set(kActorSadik, kSetKP07);
		Actor_Set_At_XYZ(kActorSadik, -12.0f, -41.58f, 72.0f, 0);
		return true;

	case 420:
	case 450:
		return true;
	}
	return false;
}
コード例 #16
0
ファイル: lucy.cpp プロジェクト: BenCastricum/scummvm
void AIScriptLucy::CompletedMovementTrack() {
	switch (Actor_Query_Goal_Number(kActorLucy)) {
	case 205:
		if (!Game_Flag_Query(616) || Global_Variable_Query(40) != 3) {
			AI_Countdown_Timer_Reset(kActorLucy, 0);
			AI_Countdown_Timer_Start(kActorLucy, 0, 30);
			return; //false;
		}
		Actor_Set_Goal_Number(kActorLucy, 250);
		return; //true;

	case 210:
		Actor_Set_Goal_Number(kActorLucy, 211);
		break;

	case 211:
		Game_Flag_Set(593);
		Actor_Set_Goal_Number(kActorLucy, 299);
		break;

	case 212:
		Actor_Set_Goal_Number(kActorLucy, 213);
		break;

	case 213:
		if (Actor_Clue_Query(kActorLucy, 219) && Global_Variable_Query(40) != 3) {
			Game_Flag_Set(593);
		} else {
			Actor_Set_Goal_Number(kActorLucy, 230);
			Game_Flag_Reset(584);
		}
		break;

	case 214:
		Actor_Set_Goal_Number(kActorLucy, 215);
		break;

	case 215:
		Actor_Set_Goal_Number(kActorLucy, 201);
		break;

	case 220:
	case 225:
		Actor_Set_Goal_Number(kActorLucy, 200);
		break;

	case 233:
		Game_Flag_Set(585);
		Actor_Set_Goal_Number(kActorLucy, 234);
		break;

	case 234:
		Actor_Set_Goal_Number(kActorLucy, 235);
		break;

	case 236:
		Actor_Set_Goal_Number(kActorLucy, 237);
		break;

	case 238:
		Game_Flag_Set(593);
		Actor_Put_In_Set(kActorLucy, kSetFreeSlotA);
		Actor_Set_At_Waypoint(kActorLucy, 33, 0);
		Actor_Set_Health(kActorLucy, 30, 30);
		if (Global_Variable_Query(40) == 3) {
			Actor_Set_Goal_Number(kActorSteele, 240);
		}
		break;

	case 239:
		Game_Flag_Set(593);
		break;

	default:
		break;
	}
	return; //false;
}