Sorry about the late answer. I re read the post, followed the instructions,
and it worked! I must have put it in the wrong function the last time.
But now I have another problem: I can't leave the Hotel!
I've poked around the script and i've made the task appear after you kill the traitor. Another problem is that if I get the docs and
then kill the traitor the mission ends then and there, no "Kill the Manager" or even "Leve the Hotel".
Here are the functions i've changed:
When the traitor is killed
function Level.OnKilledGad()
if (Level.IsMissionFailed() != false) then
return;
end
if (Level.IsMissionTaskCompleted( 'FNDS' ) == false) then
Level.FailedMission( MissionText.Failed_GadKilled );
return;
end
-- Deleted to make sure Manager is killed before leaving
-- if (Level.IsMissionTaskCompleted( 'DOCS' ) ) then
-- Level.SetupLeaveTask();
-- end
Level.CompleteMissionTask( 'KILL', 15.0 );
Level.EnableLevelMark('POOL', false);
-- Custom Manager task added when traitor is killed
Level.AddMissionTask( MissionText.kill_manager, 'id_km', "levels\\hotel\\km.txt" );
Level.AddActionHandler( Level.AH_ACTOR_KILLED , "HM03" , "OnKilledManager");
Level.AddSmallMessage( MissionText.Clues, 15.0, 255, 255, 255 );
Level.AddLargeMessage( MissionText.TaskChanged, 15.0, 255, 255, 255 );
-- END
if (Level.IsPlayerAtLibrary()) then
local gad = AI.FindNPC('HG42');
if (gad != nil) then
AI.SetGameFlag(gad, AI.F_ENABLE_ALWAYS, true);
end
end
end
When the manager is killed
function Level.OnKilledManager()
Level.CompleteMissionTask( "id_km" );
Level.RemoveMissionTask('id_km');
-- Check if docs have been retrived
if (Level.IsMissionTaskCompleted( 'DOCS' ) ) then
Level.SetupLeaveTask();
end
end
I added this to MissionText:
kill_manager = "Kill the hotel manager.";
Clues = "It looks like the manager helped him.";
Any help would be greatly appreciated