Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > Death to Spies

Death to Spies Stealth action. Professional spy working for the Soviet counterintelligence service executes dangerous operations in the heart of German territory.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-10-2012, 10:48 PM
AHO's Avatar
AHO AHO is offline
Approved Member
 
Join Date: Aug 2008
Location: Germany
Posts: 538
Default

Quote:
Originally Posted by ryan221b View Post
I've managed to add the new task to the mission but if I save and load the task gets duplicated every time. I had a look at the OnSave function but didn't know how to modify it. Could someone help me solve this problem?
Hi,
could you post your lua code?
Reply With Quote
  #2  
Old 08-15-2012, 10:45 AM
ryan221b ryan221b is offline
Registered Member
 
Join Date: May 2012
Posts: 4
Default

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

Last edited by ryan221b; 08-30-2012 at 09:51 AM.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:00 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.