Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Add quest after reading note?
serbusfish Offline
Member

Posts: 211
Threads: 75
Joined: Aug 2012
Reputation: 0
#1
Add quest after reading note?

I was just wondering how do I add a quest once you have picked up and read a note?

04-19-2013, 03:08 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Add quest after reading note?

Just use:

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

void OnPickup (string &in asEntity, string &in asType)
{
AddQuest("Nameofthequest", "Entryofthequest");
}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
04-19-2013, 03:20 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#3
RE: Add quest after reading note?

For the quest after note thing;
PHP Code: (Select All)
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.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 04-19-2013, 03:24 PM by PutraenusAlivius.)
04-19-2013, 03:22 PM
Find
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#4
RE: Add quest after reading note?

(04-19-2013, 03:22 PM)JustAnotherPlayer Wrote: For the quest after note thing;
PHP Code: (Select All)
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

"What you think is irrelevant" - A character of our time

A Christmas Hunt
04-19-2013, 03:52 PM
Find
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#5
RE: Add quest after reading note?

Once the player picks a note up, the game is paused. So it's enough setting a 0.1 ms timer.
04-19-2013, 04:30 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#6
RE: Add quest after reading note?

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");
}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
04-19-2013, 04:38 PM
Find
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#7
RE: Add quest after reading note?

just curious random person passing by. is mementos and quest the same thing?
04-19-2013, 08:36 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#8
RE: Add quest after reading note?

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

Trying is the first step to success.
04-19-2013, 08:37 PM
Find
serbusfish Offline
Member

Posts: 211
Threads: 75
Joined: Aug 2012
Reputation: 0
#9
RE: Add quest after reading note?

Thank you guys I will give it a go Tongue

04-22-2013, 12:12 AM
Find




Users browsing this thread: 1 Guest(s)