Frictional Games Forum (read-only)
[SCRIPT] Adding note through script - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Adding note through script (/thread-30180.html)



Adding note through script - Slanderous - 06-29-2015

Hey there. I want to add a note to the journal in one of the scripts I got in my mod.

I found this on Engine Scripts page, but I don't really understand that function, specifically the "Must end with _Name and _Text". Can someone explain it to silly me? >_>

Code:
void AddNote(string& asNameAndTextEntry, string& asImage);
Adds a note to the player's journal.

asNameAndTextEntry - entries in the .lang file. Must end with _Name and _Text and be in category “Journal”!
asImage - the background image to be used

Thanks ahead of time!


RE: Adding note through script - Rahmerh - 06-29-2015

Mhmm that's really odd... It would make sense if you needed 2 strings. 1 for _Name and 1 for _Text... Have you tried it like this: "This is the name_Name this is the text_Text"? I'm pretty sure it wont work, but you could try


RE: Adding note through script - Slanderous - 06-29-2015

(06-29-2015, 10:50 PM)Rahmerh Wrote: Mhmm that's really odd... It would make sense if you needed 2 strings. 1 for _Name and 1 for _Text... Have you tried it like this: "This is the name_Name this is the text_Text"? I'm pretty sure it wont work, but you could try

I figured it out somehow. You only need to specify the entry from journal category. Thanks for the tip though!


RE: Adding note through script - Rahmerh - 06-29-2015

(06-29-2015, 11:06 PM)Lazzer Wrote:
(06-29-2015, 10:50 PM)Rahmerh Wrote: Mhmm that's really odd... It would make sense if you needed 2 strings. 1 for _Name and 1 for _Text... Have you tried it like this: "This is the name_Name this is the text_Text"? I'm pretty sure it wont work, but you could try

I figured it out somehow. You only need to specify the entry from journal category. Thanks for the tip though!

Oh right, that makes sense xD Of course it pulls it's content from the .lang file... I can't think sometimes Tongue