Frictional Games Forum (read-only)
How to add a quest? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: How to add a quest? (/thread-13114.html)



How to add a quest? - Shives - 02-05-2012

Hi
I want to add a quest when you press a button
but how to script it?



RE: How to add a quest? - Elven - 02-05-2012

Do you know how to set condition for start? All the other part comes after condition is met Tongue



RE: How to add a quest? - Shives - 02-05-2012

I don't really understand
What's condition?



RE: How to add a quest? - Elven - 02-05-2012

Welcome to the world of scripting:

http://wiki.frictionalgames.com/hpl2/tutorials/scripting/article



RE: How to add a quest? - Shives - 02-05-2012

I know this page
Could you just show me how this script shold look like?

(Thank you i wanted to know too how to script the piano scare and now i know it because I've seen your tutorial)



RE: How to add a quest? - Elven - 02-05-2012

void OnStart()
{
SetEntityPlayerInteractCallback("ButtonName", "FunctionName", true);
}

void FunctionName(string &in asEntity)
{
AddQuest("QuestName", "EntryName");
}

u get all more detailed info about functions and how they work from your scripting bible:

http://wiki.frictionalgames.com/hpl2/amnesia/script_functions



RE: How to add a quest? - Your Computer - 02-05-2012

For a button, it may be more practical to go with SetEntityConnectionStateChangeCallback instead of SetEntityPlayerInteractCallback.