Frictional Games Forum (read-only)

Full Version: How to add a quest?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi
I want to add a quest when you press a button
but how to script it?
Do you know how to set condition for start? All the other part comes after condition is met Tongue
I don't really understand
What's condition?
Welcome to the world of scripting:

http://wiki.frictionalgames.com/hpl2/tut...ng/article
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)
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/amn..._functions
For a button, it may be more practical to go with SetEntityConnectionStateChangeCallback instead of SetEntityPlayerInteractCallback.