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
Adding Mementos help?
taylor122002 Offline
Junior Member

Posts: 13
Threads: 10
Joined: Aug 2012
Reputation: 0
#1
Adding Mementos help?

Hello everybody!
I have a scripting question, and many more in the future, unless I can figure them out. But I need help right now on adding Mementos to the journal. A friend of mine is working on a scripting project, and they're on Chapter 5 of their project, and I haven't even started. Although, their scripting is different than mine.

Anyways, I'm trying to actually make a custom story, with at least, well hoping, 3 chapters. And I just started, but I don't know how to add the mementos. Could someone help view my scripting I have and see what I did wrong? Or maybe it's just because I didn't add the other scripting area in which the "Quest" memento disappears, like as in you completed that quest.

In my .lang file, I have this:

<CATEGORY Name="Journal">
<Entry Name="Quest_NoticeQuest_Text">It's too dark, I better move low and fast</Entry>
</CATEGORY>

As the "Quest" area is named "Notice_Quest_Area".
I don't think there is anything wrong with the .lang file, as I've had trouble in the past where if I mess up on the .lang file, I lose everything. That hasn't happened yet, so I think that's good..

Now the .hps file:

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Notice_Quest_Area", "GetNoticeQuest", true, 1);
}

void GetNoticeQuest(string &in asEntity, int alState)
{
AddQuest("getnoticequest", "GetNoticeQuest");
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}


I'm positive I did something wrong here, I tried watching a video of this, and the part where it says
"AddQuest("getnoticequest", "GetNoticeQuest");", in the video they put down this function, except changed everything with their own stuff.
"AddQuest("namequest", "NameQuest");
so I thought I'd do the same with me, except when I run into the quest area where you would get the memento, nothing happens.

Sorry, I'm very new to this, so I don't understand what I'm supposed to do with this. I only know how to add journal entries and make keys unlock doors. Any help would be appreciated, and I thank everyone who replies in advanced!
09-24-2012, 05:08 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: Adding Mementos help?

Issue 1:
The callback syntax for your function "GetNoticeQuest" isn't correct. You have:

(string &in asEntity, int alState)

when it should be:

(string &in asParent, string &in asChild, int alState)



Issue 2:
This part:

AddQuest("getnoticequest", "GetNoticeQuest");

isn't consistant with the .lang file; the name of the quest in the lang file is "NoticeQuest". Try this instead:

AddQuest("noticequest", "NoticeQuest");



Issue 3:
Make sure you only have 1 category named Journal, and not multiple (in the past I've seen people accidentally make multiple journal categories for different types of entries).




Hope that helped!

I rate it 3 memes.
(This post was last modified: 09-24-2012, 05:17 AM by Adny.)
09-24-2012, 05:15 AM
Find




Users browsing this thread: 1 Guest(s)