Frictional Games Forum (read-only)

Full Version: Show messages / text when looking at an area? (Kind of solved)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've seen in a few maps that when you look at something there appears text about whatever object / item you are looking at. I've inspected a map in which there are a lot of these, that map / story is "The Estate". I saw that the creator used "Sign Areas" around the objects then changed the "Text Cat" to "Descriptions" and "TextEntry" to the name of an entry inside the Descriptions category in the extra_english.lang file.

For example....

In one room there is a map of Spain, when you look at it, the following message appears. "A map of Spain, it looks worn."

In the level editor, there is a sign area around the map with..
TextCat: Descriptions
TextEntry: Spain

And in the extra_english.lang file

<CATEGORY Name="Descriptions">

<Entry Name="Spain"> A map of Spain, it looks worn.</Entry>

</CATEGORY>


So I tried doing the same thing in my own map but it doesn't work. I've looked through the scripts for the levels but I can't find anything about the messages there, so obviously there is no script required for this, but why ain't it working for me?

I have made a sign area around a chandelier, changed the TextCat to Descriptions and TextEntry to Chandelier and added them to my extra_english.lang file, it looks like this:

<CATEGORY Name = "Descriptions"
<Entry Name="Chandelier"> This chandelier lights up the entire room.</Entry>

</CATEGORY>

Thanks in advance!
I use a different method altogether. Example script:

void OnStart()
{
SetEntityPlayerLookAtCallback("ScriptArea_1", "LookAtMessage", true); //When player looks at ScriptArea_1, call "LookAtMessage".
}

void LookAtMessage(string &in entity, int alState)
{
SetMessage("TextCat", "TextEnty", 3.0f); //Displays message from category "TextCat", entry "TextEnty", for three seconds.
}
Thanks but I'd really like to know how it is made on other maps without using scripts.

Thanks anyway though.
Use sign areas. Those are made without scripts.
Did you even read my first post? That's exactly what I've been trying.

Btw I love your map Belphegor. Tongue
Oh, sorry. There is nothing wrong with your method. Check your area and .lang for spelling mistakes.

Haha thanks Wink
I finally got it work. Not on the map that I first tried it on however, but I tried it the EXACT same way on one of my other maps and then it worked..

If anyone has an idea as to why it didn't work on my other map though, feel free to tell me.

Thanks Acies and Roenlond, though. Smile
You guys are really just thinking to hard about it.
I'll explain it step for step:

Step1. Mke a map of spain

Step2. Ceate an Sign area around it

Step3. Cick on the sign area, click on area/TextCat and write down: Descriptions

Step4. D the same as previous but then click on area/TextEntry and write down: Spain

Now if you look at the map u will see your text Wink

Regards,
Ferry Adams