Frictional Games Forum (read-only)

Full Version: Add quest after reading note?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was just wondering how do I add a quest once you have picked up and read a note?
Just use:

void OnStart()
{
SetEntityCallbackFunc("DaNote", "OnPickup");
}

void OnPickup (string &in asEntity, string &in asType)
{
AddQuest("Nameofthequest", "Entryofthequest");
}
For the quest after note thing;
PHP Code:
void OnStart()
{
SetEntityCallbackFunc("NOTENAME""AddTimerQuest");
}

void AddTimerQuest(string &in asEntitystring &in type)
{
AddTimer(""3.0f"AddQuest"); //Change 3.0f to how long you want the note to last.
}

void AddQuest(string &in asTimer)
{
AddQuest("Quest1""EntryName"); //Change EntryName to what entry in the .lang file. Category must be in "Journal" and start with "Quest_<EntryName>_Text"! 
//(NOTE: You don't have to write the Quest_ and the _Text.)

But I don't know if the Player skips it or get's too long.

@The Chaser
The quest will be added when the Player picks it up. He wants it to be added when the Player was finished reading it too.
(04-19-2013, 03:22 PM)JustAnotherPlayer Wrote: [ -> ]For the quest after note thing;
PHP Code:
void OnStart()
{
SetEntityCallbackFunc("NOTENAME""AddTimerQuest");
}

void AddTimerQuest(string &in asEntitystring &in type)
{
AddTimer(""3.0f"AddQuest"); //Change 3.0f to how long you want the note to last.
}

void AddQuest(string &in asTimer)
{
AddQuest("Quest1""EntryName"); //Change EntryName to what entry in the .lang file. Category must be in "Journal" and start with "Quest_<EntryName>_Text"! 
//(NOTE: You don't have to write the Quest_ and the _Text.)

But I don't know if the Player skips it or get's too long.

@The Chaser
The quest will be added when the Player picks it up. He wants it to be added when the Player was finished reading it too.

There's no script that can check if the player has read the note only if the player has picked it up. Anyway, the note will open automatically on pick up so just use the interactcallback
Once the player picks a note up, the game is paused. So it's enough setting a 0.1 ms timer.
With the correction of JustAnotherPlayer, it would be like this:

void OnStart()

{

SetEntityCallbackFunc("DaNote", "OnPickup");

}



void OnPickup (string &in asEntity, string &in asType)

{

AddTimer("", 0.1, "AddDaQuest");

}


void AddDaQuest(string &in asTimer)
{
AddQuest("Nameofthequest", "Entryofthequest");
}
just curious random person passing by. is mementos and quest the same thing?
Yes.

In script language it's called quests. Ingame it was called mementos, but you can call it what you want if you have a FC
Thank you guys I will give it a go Tongue