Frictional Games Forum (read-only)
Should be an easy fix - 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: Should be an easy fix (/thread-14320.html)



Should be an easy fix - Cole - 03-29-2012

Firstly I would like to say hello first time post and new to forums. Big Grin

However I got the basics down for map making(its similar to java coding lol).

Regardless lets move on with the problem, so I have a door that I just added a message to and it says "This door needs a key to open it." Which is exactly what I wanted it to do, but the problem is it keeps saying it over and over again when I click on it.(If it helps this is a level door not a normal door).

I can show you my code if you would like thanks.


RE: Should be an easy fix - Obliviator27 - 03-29-2012

Use an if statement to determine if the door is locked upon interaction.



RE: Should be an easy fix - Cole - 03-29-2012

(03-29-2012, 02:38 AM)Obliviator27 Wrote: Use an if statement to determine if the door is locked upon interaction.

How can I use an if statement if the message is being played through extra_english.lang?

My .lang

<CATEGORY Name="Messages">
<Entry Name="MansionDoor">This door needs a key to open.</Entry>
</CATEGORY>

My .hps

void MansionDoor(string &in asEntity)
{
SetMessage("Messages", "MansionDoor", 0);
}


RE: Should be an easy fix - Obliviator27 - 03-29-2012

The if statement would be used in your .hps.
void MansionDoor(string &in asEntity)
{
if(GetSwingDoorLocked("DOORNAME"))
{
SetMessage"Messages", "MansionDoor", 0);
}
}
What this will do is check if the door is locked. If it is locked, it will set the message. If the door is unlocked, nothing will be displayed on-screen.



RE: Should be an easy fix - Cole - 03-30-2012

Yea okay thanks a lot...just wasn't sure how to add it haha working perfectly. =]