Frictional Games Forum (read-only)

Full Version: Text on screen?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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)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?
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);
}
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.