Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Text on screen?
goodcap Offline
Member

Posts: 193
Threads: 112
Joined: Jun 2012
Reputation: 3
#1
Text on screen?

Hey guys,

I played some custom stories where if you entered a certain area a message pops up in the middle of the screen. How do I do this?
11-30-2013, 07:47 PM
Find
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#2
RE: Text on screen?

From wiki:
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.
11-30-2013, 07:52 PM
Find
goodcap Offline
Member

Posts: 193
Threads: 112
Joined: Jun 2012
Reputation: 3
#3
RE: Text on screen?

(11-30-2013, 07:52 PM)The Mug Wrote: From wiki:
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.

Thanks, but how do Imake it appear in certain areas only?
11-30-2013, 08:00 PM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#4
RE: Text on screen?

void OnStart()
{
AddEntityCollideCallback("Player", "YourAreaName", "func", true, 1);
}

void func(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "name of the message in extra_english", 7);
}
11-30-2013, 08:24 PM
Find
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#5
RE: Text on screen?

http://wiki.frictionalgames.com/hpl2/amn..._functions
just in case you need it
11-30-2013, 10:50 PM
Find
ingedoom Offline
Member

Posts: 120
Threads: 12
Joined: Feb 2012
Reputation: 0
#6
RE: Text on screen?

goodcap, no offence, you have already asked this in your other thread and it is some basic stuff which you should be able to figure out using the guides, reference and codes examples from custom stories, so try and figure things out yourself before you come asking. This will make you a lot better and independant coder, but if you don't wish that, i could be your mentor and answer some questions for you.

[Image: 23778.png]
12-01-2013, 11:49 AM
Website Find




Users browsing this thread: 2 Guest(s)