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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Show messages / text when looking at an area? (Kind of solved)
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#1
Show messages / text when looking at an area? (Kind of solved)

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!
(This post was last modified: 05-13-2011, 12:03 PM by Shadowfied.)
05-09-2011, 11:46 AM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#2
RE: Show messages / text when looking at an area?

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.
}
05-09-2011, 12:39 PM
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#3
RE: Show messages / text when looking at an area?

Thanks but I'd really like to know how it is made on other maps without using scripts.

Thanks anyway though.
05-10-2011, 12:12 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#4
RE: Show messages / text when looking at an area?

Use sign areas. Those are made without scripts.

[Image: mZiYnxe.png]


05-10-2011, 12:27 PM
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#5
RE: Show messages / text when looking at an area?

Did you even read my first post? That's exactly what I've been trying.

Btw I love your map Belphegor. Tongue
(This post was last modified: 05-10-2011, 12:32 PM by Shadowfied.)
05-10-2011, 12:31 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#6
RE: Show messages / text when looking at an area?

Oh, sorry. There is nothing wrong with your method. Check your area and .lang for spelling mistakes.

Haha thanks Wink

[Image: mZiYnxe.png]


05-10-2011, 06:26 PM
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#7
RE: Show messages / text when looking at an area?

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
(This post was last modified: 05-13-2011, 12:05 PM by Shadowfied.)
05-13-2011, 12:03 PM
Find
ferryadams10 Offline
Senior Member

Posts: 288
Threads: 40
Joined: Apr 2011
Reputation: 19
#8
RE: Show messages / text when looking at an area? (Kind of solved)

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

Got a nice sofa
Please come and have a seat for a while

05-14-2011, 10:20 AM
Find




Users browsing this thread: 1 Guest(s)