Frictional Games Forum (read-only)
Locked Door 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: Locked Door Messages (/thread-9004.html)



Locked Door Messages - MrCookieh - 07-07-2011

Hello guys!

What script do I need (or is there another way around?) to show a
message like "Locked." at a swingdoor, when I interact with it?

I know there's a script for Leveldoors, but it doesn't work for swing doors.

While I was searching in the main .lang file of amnesia, I've found those
messages, but they were in a weird category, and I couldn't see how they
were used within the script.


RE: Locked Door Messages - H. Filipe - 07-07-2011

Try this:

In mapname.hps

Code:
void OnStart()
{
SetEntityPlayerInteractCallback("door", "Interactdoor", false);
}

void Interactdoor(string &in asEntity)
{
    SetMessage("Message", "doorlocked", 0);
}

In extra_english.lang
Code:
<CATEGORY Name="Message">
         <Entry Name="doorlocked">Locked</Entry>
    </CATEGORY>



RE: Locked Door Messages - MrCookieh - 07-07-2011

ah, so SetMessage was the one I was looking for!

it works now, thanks! Smile