Frictional Games Forum (read-only)

Full Version: Message on locked doors not working!=SOLVED!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello Everyone

I've just started using HPL2 editor for amnesia and have started to create my own custom story. The only problem I have come up to with my coding is that when I click on my locked door a message should appear saying "This door is locked". I have gone through many different youtube videos and forums I cannot seem to find out why it is not working, if someone would be as kind as to read my code and tell me why I would be very grateful as i've spent over 2 hours trying to just make text appear on a door lol Dodgy

anyway here is my .hps file

void OnStart()
{
SetEntityPlayerInteractCallback("Locked_Door", "DoorLockedPlayer", false);
}

void DoorLockedPlayer(string &in asEntity)
{
SetMessage("Messages", "msgname", 10);
}



void OnEnter()
{
}

void OnLeave()
{
}

and here is my .lang file

<LANGUAGE>

<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">
hello how are you?
</Entry>

</CATEGORY>

<CATEGORY Name=“Messages”>

<Entry Name=“msgname”>The door is locked</Entry>

</CATEGORY>

</LANGUAGE>
Are you using the correct quotes in your lang file? I noticed some look normal and some look askew.
"" and “”

Perhaps they are not recognized as quotes and cause a parsing error.
(04-11-2014, 09:26 PM)Mudbill Wrote: [ -> ]Are you using the correct quotes in your lang file? I noticed some look normal and some look askew.
"" and “”

Perhaps they are not recognized as quotes and cause a parsing error.

hey Mudbil!

i've just changed the quotes now and i am proud to say that it is officially working!! omg I cant believe i've got it working i've been doing it for 3 and half hours and I feel really stupid knowing it was just the quotes that needed changing Dodgy haha anyway i wanted to say a big thankyou to you and keep up the brill youtube videos!!
Why thank you c:
Glad you got it working!
Why making 2 threads of the same issue.....?
(04-11-2014, 11:41 PM)DnALANGE Wrote: [ -> ]Why making 2 threads of the same issue.....?

because I put it in the wrong category and I didnt want it to get taken down silly on my part. Confused
It wouldn't be taken down. It would just be moved here instead. It really doesn't matter on your part as long as you don't keep making them in the wrong place.
(04-12-2014, 02:04 PM)Mudbill Wrote: [ -> ]It wouldn't be taken down. It would just be moved here instead. It really doesn't matter on your part as long as you don't keep making them in the wrong place.

Ok thanks i'll keep that in mind! Blush
Its okay!
Remember to do this IF something is solved.
On your topic name : Message on locked doors not working! = SOLVED!
For example.
SO we know "we" do not have to check for help.
Just a "To know thingy"
(04-12-2014, 04:13 PM)DnALANGE Wrote: [ -> ]Its okay!
Remember to do this IF something is solved.
On your topic name : Message on locked doors not working! = SOLVED!
For example.
SO we know "we" do not have to check for help.
Just a "To know thingy"

Ok I'll change it now Smile