Angerpull
Member
Posts: 88
Threads: 24
Joined: Jun 2011
Reputation:
0
|
Text on Screen
Hello, simple question. how can I see a message on screen?
(This post was last modified: 09-27-2011, 02:11 AM by Angerpull.)
|
|
09-26-2011, 11:08 PM |
|
Tanshaydar
From Beyond
Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation:
67
|
RE: Text on Screen
Simple answer: http://wiki.frictionalgames.com/hpl2/amn..._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.
|
|
09-26-2011, 11:19 PM |
|
Angerpull
Member
Posts: 88
Threads: 24
Joined: Jun 2011
Reputation:
0
|
RE: Text on Screen
(09-26-2011, 11:19 PM)Tanshaydar Wrote: Simple answer: http://wiki.frictionalgames.com/hpl2/amn..._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?
|
|
09-26-2011, 11:57 PM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Text on Screen
(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/amn...stom_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.
|
|
09-27-2011, 12:16 AM |
|
Tanshaydar
From Beyond
Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation:
67
|
RE: Text on Screen
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.
|
|
09-27-2011, 12:17 AM |
|
Angerpull
Member
Posts: 88
Threads: 24
Joined: Jun 2011
Reputation:
0
|
RE: Text on Screen
(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.
(This post was last modified: 09-27-2011, 12:51 AM by Angerpull.)
|
|
09-27-2011, 12:35 AM |
|
Selyp
Member
Posts: 210
Threads: 19
Joined: Feb 2011
Reputation:
7
|
RE: Text on Screen
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
Atlantia - An Amnesia: The Dark Descent Full Conversion Mod
|
|
09-27-2011, 01:41 AM |
|
Angerpull
Member
Posts: 88
Threads: 24
Joined: Jun 2011
Reputation:
0
|
RE: Text on Screen
(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 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?
|
|
09-27-2011, 02:33 AM |
|
MrBigzy
Senior Member
Posts: 616
Threads: 18
Joined: Mar 2011
Reputation:
8
|
RE: Text on Screen
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?"
(This post was last modified: 09-27-2011, 11:06 PM by MrBigzy.)
|
|
09-27-2011, 11:06 PM |
|
Kinami37
Junior Member
Posts: 19
Threads: 2
Joined: Mar 2012
Reputation:
0
|
RE: Text on Screen
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..
(This post was last modified: 03-17-2012, 08:07 PM by Kinami37.)
|
|
03-17-2012, 08:06 PM |
|
|