Frictional Games Forum (read-only)

Full Version: Locked Door Messages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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>
ah, so SetMessage was the one I was looking for!

it works now, thanks! Smile