Show messages / text when looking at an area? (Kind of solved) - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Show messages / text when looking at an area? (Kind of solved) (/thread-7904.html) |
Show messages / text when looking at an area? (Kind of solved) - Shadowfied - 05-09-2011 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! RE: Show messages / text when looking at an area? - Roenlond - 05-09-2011 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. } RE: Show messages / text when looking at an area? - Shadowfied - 05-10-2011 Thanks but I'd really like to know how it is made on other maps without using scripts. Thanks anyway though. RE: Show messages / text when looking at an area? - Acies - 05-10-2011 Use sign areas. Those are made without scripts. RE: Show messages / text when looking at an area? - Shadowfied - 05-10-2011 Did you even read my first post? That's exactly what I've been trying. Btw I love your map Belphegor. RE: Show messages / text when looking at an area? - Acies - 05-10-2011 Oh, sorry. There is nothing wrong with your method. Check your area and .lang for spelling mistakes. Haha thanks RE: Show messages / text when looking at an area? - Shadowfied - 05-13-2011 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. RE: Show messages / text when looking at an area? (Kind of solved) - ferryadams10 - 05-14-2011 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 Regards, Ferry Adams |