![]() |
Display messages - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Display messages (/thread-20243.html) Pages:
1
2
|
Display messages - tonitoni1998 - 02-08-2013 hey guys, i wanted to display a message when the player starts. but just doesnt works. this is in the .hps : AddTimer("intro_message", 5, "SetMessage"); void SetMessage(string &in timer_name) { SetMessage("DisplayMessages", "IntroMessage", 0); } and this in the .lang : <Category Name="DisplayMessages"> <Entry Name="IntroMessage">whatever</Entry> </Category> where is my mistake? RE: Display messages - MulleDK19 - 02-08-2013 The language file is case sensitive. Use CATEGORY instead of Category. <CATEGORY Name="DisplayMessages"> <Entry Name="IntroMessage">whatever</Entry> </CATEGORY> RE: Display messages - tonitoni1998 - 02-08-2013 (02-08-2013, 05:06 PM)MulleDK19 Wrote: The language file is case sensitive. Use CATEGORY instead of Category. still not working ![]() RE: Display messages - MulleDK19 - 02-08-2013 (02-08-2013, 05:09 PM)tonitoni1998 Wrote:(02-08-2013, 05:06 PM)MulleDK19 Wrote: The language file is case sensitive. Use CATEGORY instead of Category. What's the rest of your language file? The problem could also be that your function is called SetMessage, so the callback tries to call the internal SetMessage function already existing in the game, rather than yours. RE: Display messages - tonitoni1998 - 02-08-2013 <LANGUAGE> <CATEGORY Name="CustomStoryMain"> <Entry Name="Description">description goes here</Entry> </CATEGORY> <CATEGORY Name="DisplayMessages"> <Entry Name="IntroMessage">whatever</Entry> </CATEGORY> </LANGUAGE> RE: Display messages - MulleDK19 - 02-08-2013 (02-08-2013, 05:11 PM)tonitoni1998 Wrote: <LANGUAGE> Read my message above. Try: Code: AddTimer("intro_message", 5, "ShowIntroMessage"); And IIRC the game will complain without a RESOURCES element in the language file (Don't quote me on that though), so just to be safe, use: Code: <LANGUAGE> RE: Display messages - tonitoni1998 - 02-08-2013 still not showing up :/ RE: Display messages - MulleDK19 - 02-08-2013 (02-08-2013, 05:17 PM)tonitoni1998 Wrote: still not showing up :/ Well, you must have something wrong someone else. I just tried that exact code with your language file, and it worked fine. Are you sure your script gets executed at all? Are you sure you named your language file correctly? If you want, you can click here to join my live chat, and I'll try to help you resolve the issue from there. RE: Display messages - tonitoni1998 - 02-08-2013 no thanks, i bet i just have a tiny mistake somewhere ![]() ![]() RE: Display messages - FlawlessHappiness - 02-08-2013 EDIT... Nope didn't solve it |