oscar1007
Member
Posts: 64
Threads: 24
Joined: Oct 2011
Reputation:
0
|
How do i display a message on the screen?
Hey!
I havn't done so much in the .lang file lately so i have kind of forgotten how to do certain things. Now im wondering, how do i make a text show up at the screen (so the position of the text is like subtitles. Im not making subtitles.)
I have done nothing so far, only made a script area where the message is going to be seen.
Can som gently soul tell me what to write in the .lang file and in the other script?
Thanks!
|
|
01-10-2012, 05:42 PM |
|
Elven
Posting Freak
Posts: 862
Threads: 37
Joined: Aug 2011
Reputation:
26
|
RE: How do i display a message on the screen?
Basically create new category whatever name you want and new entity with some name. Use that one:
SetMessage(string& asTextCategory, string& asTextEntry, float afTime);
This one will show the text in the middle tho. Only way to get text where subtitles are is using that function:
void AddEffectVoice(string& asVoiceFile, string& asEffectFile, string& asTextCat, string& asTextEntry,
bool abUsePosition, string& asPosEntity, float afMinDistance, float afMaxDistance);
This adds a voice and an effect to be played. It is okay to call this many times in order to play many voices in a row. The EffectVoiceOverCallback is not called until ALL voices have finished.
asVoiceFile - the voice to play
asEffectFile - the effect to play
asTextEntry - the text entry in the .lang file
asTextCat - the category in the .lang file
abUsePosition - ?
asPosEntity - the entity at which the effect appears
afMinDistance - minimum distance to see the effect
afMaxDistance - maximum distance to see the effect
-- But that would mean that you need empty sound file attached to any objects and it would do the job.
|
|
01-10-2012, 08:23 PM |
|
oscar1007
Member
Posts: 64
Threads: 24
Joined: Oct 2011
Reputation:
0
|
RE: How do i display a message on the screen?
(01-10-2012, 08:23 PM)Elven Wrote: Basically create new category whatever name you want and new entity with some name. Use that one:
SetMessage(string& asTextCategory, string& asTextEntry, float afTime);
This one will show the text in the middle tho. Only way to get text where subtitles are is using that function:
void AddEffectVoice(string& asVoiceFile, string& asEffectFile, string& asTextCat, string& asTextEntry,
bool abUsePosition, string& asPosEntity, float afMinDistance, float afMaxDistance);
This adds a voice and an effect to be played. It is okay to call this many times in order to play many voices in a row. The EffectVoiceOverCallback is not called until ALL voices have finished.
asVoiceFile - the voice to play
asEffectFile - the effect to play
asTextEntry - the text entry in the .lang file
asTextCat - the category in the .lang file
abUsePosition - ?
asPosEntity - the entity at which the effect appears
afMinDistance - minimum distance to see the effect
afMaxDistance - maximum distance to see the effect
-- But that would mean that you need empty sound file attached to any objects and it would do the job. Ok thanks so if i want to display the message "RUUUN!!" as a text on the screen, how would i write it in the .lang file?
Thanks your awesome for helping!
|
|
01-10-2012, 09:02 PM |
|
Elven
Posting Freak
Posts: 862
Threads: 37
Joined: Aug 2011
Reputation:
26
|
RE: How do i display a message on the screen?
<category name="Information">
<entry name="run">RUUUN!!</entry>
</category>
For example. This way you put into textCat "Information" and into TextEntry "run"
And in future, you can still use Information, just put different Entry same way.
(This post was last modified: 01-10-2012, 09:11 PM by Elven.)
|
|
01-10-2012, 09:10 PM |
|
Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
RE: How do i display a message on the screen?
(01-10-2012, 09:10 PM)Elven Wrote: RUUUN!!
For example. This way you put into textCat "Information" and into TextEntry "run"
And in future, you can still use Information, just put different Entry same way.
Make sure things are capitalized properly!
<CATEGORY Name="Information">
<Entry Name="run">RUUUN!!</Entry>
</CATEGORY>
|
|
01-10-2012, 09:23 PM |
|
Elven
Posting Freak
Posts: 862
Threads: 37
Joined: Aug 2011
Reputation:
26
|
RE: How do i display a message on the screen?
Oh yes, CATEGORY must be capitalized ... Told u that by heart, as I am in laptop .
|
|
01-10-2012, 09:32 PM |
|
Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
RE: How do i display a message on the screen?
(01-10-2012, 09:32 PM)Elven Wrote: Oh yes, CATEGORY must be capitalized ... Told u that by heart, as I am in laptop . So am I =P WERK DEM FINGERS
|
|
01-10-2012, 09:38 PM |
|
Elven
Posting Freak
Posts: 862
Threads: 37
Joined: Aug 2011
Reputation:
26
|
RE: How do i display a message on the screen?
Well, I am not posting freak >.<
(This post was last modified: 01-10-2012, 09:40 PM by Elven.)
|
|
01-10-2012, 09:40 PM |
|
Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
RE: How do i display a message on the screen?
(01-10-2012, 09:40 PM)Elven Wrote: Well, I am not posting freak >.<
Yeeeeeeahhhh... It doesn't feel like 800+ posts >> I come here often.
|
|
01-10-2012, 09:54 PM |
|
Elven
Posting Freak
Posts: 862
Threads: 37
Joined: Aug 2011
Reputation:
26
|
RE: How do i display a message on the screen?
I come when I don't have so busy times...
|
|
01-10-2012, 09:57 PM |
|
|