Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Note/Diary Narration
Author Message
JoeBradleyUK Offline
Member

Posts: 115
Joined: Jul 2011
Reputation: 0
Post: #21
RE: Note/Diary Narration

(07-15-2011 01:59 AM)palistov Wrote:  Not sure if these have been mentioned before, but:

Don't capitalize the v in voice. The lang file is very sensitive, that could be what is messing things up. Also, make sure your sound file is in the sounds folder, and that the diary's DiaryText field matches the text in your lang file, in the case of the note to self, it would be ndiaryone. Also be sure the diary's callback contains ReturnOpenJournal(true);

Isn't it in the diaries folder and not the sounds folder? And how do I set up the diary callback return open journal?

I'm still in the learning of scripting.

:Work In Progress:
Insanity
07-15-2011 07:59 AM
Find all posts by this user Quote this message in a reply
palistov Offline
Posting Freak

Posts: 1,213
Joined: Mar 2011
Reputation: 57
Post: #22
RE: Note/Diary Narration

It works both ways probably. I used an empty sound file and placed it in the sounds folder for a diary a while back, and it worked fine.

As for adding a diary callback, select the diary paper in the editor, then go to the Entity tab. Under the DiaryCallback field, put your function's name. The form is

void DiaryFuncName(string &in item, int index) {
ReturnOpenJournal(true);
//Other cool stuff
}

07-15-2011 08:18 AM
Find all posts by this user Quote this message in a reply
JoeBradleyUK Offline
Member

Posts: 115
Joined: Jul 2011
Reputation: 0
Post: #23
RE: Note/Diary Narration

(07-15-2011 08:18 AM)palistov Wrote:  It works both ways probably. I used an empty sound file and placed it in the sounds folder for a diary a while back, and it worked fine.

As for adding a diary callback, select the diary paper in the editor, then go to the Entity tab. Under the DiaryCallback field, put your function's name. The form is

void DiaryFuncName(string &in item, int index) {
ReturnOpenJournal(true);
//Other cool stuff
}

Right I'll get down with testing that tommorow :3

:Work In Progress:
Insanity
07-15-2011 11:30 PM
Find all posts by this user Quote this message in a reply
JoeBradleyUK Offline
Member

Posts: 115
Joined: Jul 2011
Reputation: 0
Post: #24
RE: Note/Diary Narration

Sorry for my ignorance, but i can't seem to figure this out. you'll have to go through in detail. Undecided

:Work In Progress:
Insanity
07-16-2011 03:43 PM
Find all posts by this user Quote this message in a reply
palistov Offline
Posting Freak

Posts: 1,213
Joined: Mar 2011
Reputation: 57
Post: #25
RE: Note/Diary Narration

Haha sure thing.

First step, make sure your lang file's entry is in order.

<CATEGORY Name="Journal">
<Entry Name="Diary_YourDiary_Name1">Your Diary's Name</Entry>
<Entry Name="Diary_YourDiary_Text1">[voice yourdiarynarration.ogg][br]Your Diary's Text</Entry>
</CATEGORY>

That's the basic structure. For diaries that have multiple notes (for instance, a story split up into 3 parts), use the indexes after the entry name. I believe this is just used to put the dairies in order in your journal, in case you pick them up out of order. Not sure though. The 'yourdiarynarration' sound file, or whatever it may be in your case NEEDS to exist. Without it the diary will automatically close once it is picked up, even when you put ReturnOpenJournal(true); in your diary's callback. This is because diaries NEED a narration to play when they are picked up, while notes' narrations are optional.

Now, on to your prop. Place the diary page and select it. On the right side you'll see two tabs. Click the 'Entity' tab. Under the DiaryText field put 'YourDiary', or whatever it was named in your lang file. Next, put 'YourDiaryCallback' under the DiaryCallback field. Don't include those single quotation marks.

In your script file, add the function:

void YourDiaryCallback(string &in name, int index)
{
ReturnOpenJournal(true);
//This stuff will happen when your diary is picked up
}

Once this is all done, launch your story from the main menu and see if it works Smile
If your diary's text isn't working, check your lang file for mistakes. If it is opening and closing immediately, make sure your diary's narration file matches the file you pointed to in your lang file, and that it exists and is in the game files somewhere, ideally the sounds folder.

(This post was last modified: 07-16-2011 03:58 PM by palistov.)
07-16-2011 03:57 PM
Find all posts by this user Quote this message in a reply
JoeBradleyUK Offline
Member

Posts: 115
Joined: Jul 2011
Reputation: 0
Post: #26
RE: Note/Diary Narration

(07-16-2011 03:57 PM)palistov Wrote:  Haha sure thing.

First step, make sure your lang file's entry is in order.

<CATEGORY Name="Journal">
<Entry Name="Diary_YourDiary_Name1">Your Diary's Name</Entry>
<Entry Name="Diary_YourDiary_Text1">[voice yourdiarynarration.ogg][br]Your Diary's Text</Entry>
</CATEGORY>

That's the basic structure. For diaries that have multiple notes (for instance, a story split up into 3 parts), use the indexes after the entry name. I believe this is just used to put the dairies in order in your journal, in case you pick them up out of order. Not sure though. The 'yourdiarynarration' sound file, or whatever it may be in your case NEEDS to exist. Without it the diary will automatically close once it is picked up, even when you put ReturnOpenJournal(true); in your diary's callback. This is because diaries NEED a narration to play when they are picked up, while notes' narrations are optional.

Now, on to your prop. Place the diary page and select it. On the right side you'll see two tabs. Click the 'Entity' tab. Under the DiaryText field put 'YourDiary', or whatever it was named in your lang file. Next, put 'YourDiaryCallback' under the DiaryCallback field. Don't include those single quotation marks.

In your script file, add the function:

void YourDiaryCallback(string &in name, int index)
{
ReturnOpenJournal(true);
//This stuff will happen when your diary is picked up
}

Once this is all done, launch your story from the main menu and see if it works Smile
If your diary's text isn't working, check your lang file for mistakes. If it is opening and closing immediately, make sure your diary's narration file matches the file you pointed to in your lang file, and that it exists and is in the game files somewhere, ideally the sounds folder.


THANKYOU, THANKYOU, THANKYOU, THANKYOU, THANKYOU, THANKYOU, THANKYOU, THANKYOU, THANKYOU, and everyone who helped!!! It works, wooo! It gives me great pleasure to change this thread to SOLVED!! Thanks again Big Grin Heart

:Work In Progress:
Insanity
07-16-2011 04:51 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)