Frictional Games Forum (read-only)
Text on Screen - 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: Text on Screen (/thread-10483.html)

Pages: 1 2


Text on Screen - Angerpull - 09-26-2011

Hello, simple question. how can I see a message on screen?


RE: Text on Screen - Tanshaydar - 09-26-2011

Simple answer: http://wiki.frictionalgames.com/hpl2/amnesia/script_functions

Advanced answer:
void SetMessage(string& asTextCategory, string& asTextEntry, float afTime);

Displays a message on the screen.

asTextCategory - the category in the .lang file
asTextEntry - the entry in the .lang file
afTime - determines how long the message is displayed. If time is < =0 then the life time is calculated based on string length.




RE: Text on Screen - Angerpull - 09-26-2011

(09-26-2011, 11:19 PM)Tanshaydar Wrote: Simple answer: http://wiki.frictionalgames.com/hpl2/amnesia/script_functions

Advanced answer:
void SetMessage(string& asTextCategory, string& asTextEntry, float afTime);

Displays a message on the screen.

asTextCategory - the category in the .lang file
asTextEntry - the entry in the .lang file
afTime - determines how long the message is displayed. If time is < =0 then the life time is calculated based on string length.


Gee thanks, that helped me nothing at all since all I see is the script and nothing about how to make it appear on my screen. What? Do I yell at my computer what it shall say there?


RE: Text on Screen - Your Computer - 09-27-2011

(09-26-2011, 11:57 PM)Angerpull Wrote: Gee thanks, that helped me nothing at all since all I see is the script and nothing about how to make it appear on my screen. What? Do I yell at my computer what it shall say there?

It would appear you lack understanding in the importance of the extra_english.lang (or whatever language you're using) file in relation to the function provided to you.

As the description below the function describes, "asTextCategory" is the category name provided in your .lang file. "asTextEntry" is the entry name provided in your .lang file. Example of a lang file can be found here: http://wiki.frictionalgames.com/hpl2/amnesia/custom_story

Notice the "name" attribute for the CATEGORY and Entry tags. You pass the value of those name attributes in their appropriate parameter slots of the function provided to you. If a message is still not displayed on the screen by your script, then either your code logic is faulty or you spelled something incorrectly.

If it is the case that you are not a scripter, then you may never see a message on the screen.


RE: Text on Screen - Tanshaydar - 09-27-2011

I don't want to sound harsh, but you are working on (a) custom story(ies) for a long time and still you don't want to write one single line yourself. I got that reaction from you a few times already, and it doesn't sound like you are appreciating the help as you already do not try to do it yourself and waiting people to do it for you. At this rate, I'll start thinking you do not even read the descriptions since you see it is something you have to evaluate.

What's so hard in using SetMessage function?
SetMessage("Category", "Entry", 0);
This, if your text category in .lang file is named Category and entry is named Entry. You can change 0 to another number depending how long you want that text to stay on the screen. You can read the description to learn what 0 does.


RE: Text on Screen - Angerpull - 09-27-2011

(09-27-2011, 12:17 AM)Tanshaydar Wrote: I don't want to sound harsh, but you are working on (a) custom story(ies) for a long time and still you don't want to write one single line yourself. I got that reaction from you a few times already, and it doesn't sound like you are appreciating the help as you already do not try to do it yourself and waiting people to do it for you. At this rate, I'll start thinking you do not even read the descriptions since you see it is something you have to evaluate.

What's so hard in using SetMessage function?
SetMessage("Category", "Entry", 0);
This, if your text category in .lang file is named Category and entry is named Entry. You can change 0 to another number depending how long you want that text to stay on the screen. You can read the description to learn what 0 does.
You see, I try it myself, I look at the forum, I search what I want to do, I test it, I fail and THEN I come with a new thread...
(09-27-2011, 12:17 AM)Tanshaydar Wrote: I don't want to sound harsh, but you are working on (a) custom story(ies) for a long time and still you don't want to write one single line yourself. I got that reaction from you a few times already, and it doesn't sound like you are appreciating the help as you already do not try to do it yourself and waiting people to do it for you. At this rate, I'll start thinking you do not even read the descriptions since you see it is something you have to evaluate.

What's so hard in using SetMessage function?
SetMessage("Category", "Entry", 0);
This, if your text category in .lang file is named Category and entry is named Entry. You can change 0 to another number depending how long you want that text to stay on the screen. You can read the description to learn what 0 does.
I appreciate every help I can get... I don't appriciate someone who just Copy Paste and then expect me to figure it out at an instant, I hate doing that. I went first to the wiki site and omfg they are poor to explain in detail, then I found the forums, I asked the community and Great! I find out how to do these things, so when I face something new I want to do, I first search the forum for help, I get no dime out of it since it lacks the threads for what I need, so hey! I make my own thread! Only to face someone who copy pastes...

If I had this gift of scripting, knowing every command, what it does, when to use it, how to use it, and why to use it. I would help people in detail instead of rushing to the Wiki site as fast as I can and hold my fingers on the mouse ready to press CTRL+C and CTRL+V, and then run away from the thread expecting people to know what to do. When people copy and paste, I feel helpless.


RE: Text on Screen - Selyp - 09-27-2011

It does take a while to understand, especially if you've never scripted in your life. I was in the same spot as you a few months ago. Just keep at it, and keep trying to learn how everything connects, and one day it will just click. It's a lot of trial and error in the beginning, but that's just the nature of making custom stories. It helps seperate those who have what it takes and those who don't Tongue


RE: Text on Screen - Angerpull - 09-27-2011

(09-27-2011, 01:41 AM)Selyp Wrote: It does take a while to understand, especially if you've never scripted in your life. I was in the same spot as you a few months ago. Just keep at it, and keep trying to learn how everything connects, and one day it will just click. It's a lot of trial and error in the beginning, but that's just the nature of making custom stories. It helps seperate those who have what it takes and those who don't Tongue
And that's weird, I hardly know how to make a message on my screen, but I know now. And I instantly learn how to use timers? What kind of black magic is this?



RE: Text on Screen - MrBigzy - 09-27-2011

If you don't want people to copy paste you, then don't simply ask how to do something without even mentioning that you know what function performs it. And post the code you tried. Or else it will seem like you don't know how to do it at all and people will simply link you to the wiki.

We want to help, but we can't help if people are like "how do dis?"


RE: Text on Screen - Kinami37 - 03-17-2012

SetMessage isnt working for me...
here are the texts..

void Ende(string &in asChild, string &in asParent, int alState)
{

SetMessage("Messages", "message1", 5.0f);
}

and the extra_english.lang

CATEGORY Name="Messages">
<Entry Name="message1">Oh! Hallo! Ich habe gehofft du würdest mich findet...</Entry>
</CATEGORY>

Sorry for my bad english and script skills..