Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Show message when interacting with a door?
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#11
RE: Show message when interacting with a door?

Try:

void OnStart()
{
    SetEntityPlayerInteractCallback("wifesroom", "showdoortext1", true);
}


void showdoortext1(string &in asEntity)
{
    if(GetSwingDoorLocked("wifesroom") == true)
    {
        SetMessage("Message", "doortext1", 0);
    }
}
09-29-2012, 07:30 PM
Find
srobb Offline
Junior Member

Posts: 24
Threads: 4
Joined: Sep 2012
Reputation: 0
#12
RE: Show message when interacting with a door?

Still doesn't work.


SetEntityPlayerInteractCallback("wifesroom", "showdoortext1", true);





void showdoortext1(string &in asEntity)

{
if(GetSwingDoorLocked("wifesroom")== true)
{
SetMessage("Message", "doortext1", 0);
}
}
09-30-2012, 11:51 AM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#13
RE: Show message when interacting with a door?

Hmm... as same as "journal" it could be possible that you had to put just "messages". So, this tutorial is a very good one to add messages to a locked door. Wink

http://wiki.frictionalgames.com/hpl2/tut...cked_doors

And the .lang file should be like this:

<LANGUAGE>

<CATEGORY Name="CustomStoryMain">

<Entry Name="Description"> descriptionhere

</Entry>

</CATEGORY>



<CATEGORY Name="Levels">



<Entry Name="level_hub_1">...</Entry>



</CATEGORY>



<CATEGORY Name="Messages">

<Entry Name="doortext1">Hmm... My wife's room... I wonder why it's locked.</Entry>

</CATEGORY>

<LANGUAGE>

And your .hps like this:

void showdoortext1(string &in asEntity)



{

if(GetSwingDoorLocked("wifesroom")== true)

{

SetMessage("Messages", "doortext1", 0);

}

}


You don't actually need the SetEntityPlayerInteractCallback.
Also, when the .lang file doesn't work, you can see it even before playing the story. If the description doesn't appear, that means to be that your .lang file is wrong. A single error and all will be gone.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
09-30-2012, 01:00 PM
Find
srobb Offline
Junior Member

Posts: 24
Threads: 4
Joined: Sep 2012
Reputation: 0
#14
RE: Show message when interacting with a door?

Ok, I changed the .lang file and got rid of the SetEntityPlayerInteractCallback, still no luck.
I followed the tutorial you gave me, no luck.
09-30-2012, 01:11 PM
Find
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#15
RE: Show message when interacting with a door?

(09-30-2012, 01:00 PM)The chaser Wrote: Hmm... as same as "journal" it could be possible that you had to put just "messages". So, this tutorial is a very good one to add messages to a locked door. Wink

http://wiki.frictionalgames.com/hpl2/tut...cked_doors

And the .lang file should be like this:

<LANGUAGE>

<CATEGORY Name="CustomStoryMain">

<Entry Name="Description"> descriptionhere

</Entry>

</CATEGORY>



<CATEGORY Name="Levels">



<Entry Name="level_hub_1">...</Entry>



</CATEGORY>



<CATEGORY Name="Messages">

<Entry Name="doortext1">Hmm... My wife's room... I wonder why it's locked.</Entry>

</CATEGORY>

<LANGUAGE>

And your .hps like this:

void showdoortext1(string &in asEntity)



{

if(GetSwingDoorLocked("wifesroom")== true)

{

SetMessage("Messages", "doortext1", 0);

}

}


You don't actually need the SetEntityPlayerInteractCallback.
Also, when the .lang file doesn't work, you can see it even before playing the story. If the description doesn't appear, that means to be that your .lang file is wrong. A single error and all will be gone.
Angel
</LANGUAGE>

you forgot this you have double

<LANGUAGE>

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
09-30-2012, 01:31 PM
Find
srobb Offline
Junior Member

Posts: 24
Threads: 4
Joined: Sep 2012
Reputation: 0
#16
RE: Show message when interacting with a door?

I changed it to </LANGUAGE>, does nothing.
09-30-2012, 01:55 PM
Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#17
RE: Show message when interacting with a door?

(09-30-2012, 01:55 PM)srobb Wrote: I changed it to , does nothing.
It may seem stupid, but try restarting Amnesia.

Also, post your lang. file again. Use "code" tags for that.

And in the Level Editor, select the door, click its "entity" tab, go to "PlayerInteractCallback", write the name of the function you used in the script file.

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
(This post was last modified: 09-30-2012, 02:01 PM by Robby.)
09-30-2012, 01:57 PM
Website Find
srobb Offline
Junior Member

Posts: 24
Threads: 4
Joined: Sep 2012
Reputation: 0
#18
RE: Show message when interacting with a door?

I tried restarting Amnesia, no luck.

<LANGUAGE>

<CATEGORY Name="CustomStoryMain">

<Entry Name="Description"> descriptionhere

</Entry>

</CATEGORY>


<CATEGORY Name="Levels">


<Entry Name="level_hub_1">...</Entry>


</CATEGORY>


</CATEGORY>

<CATEGORY Name="Messages">

<Entry Name="wifesroomtext1">Hmm... My wife's room... I wonder why it's locked.</Entry>

</CATEGORY>

</LANGUAGE>


In the PlayerInteractCallback bar, I wrote "wifesroom". Is this right?
09-30-2012, 02:11 PM
Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#19
RE: Show message when interacting with a door?

<Entry Name="Description"> descriptionhere

</Entry>



Try to:


<Entry Name="Description">Description Here</Entry>

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
09-30-2012, 02:24 PM
Website Find
srobb Offline
Junior Member

Posts: 24
Threads: 4
Joined: Sep 2012
Reputation: 0
#20
RE: Show message when interacting with a door?

Nope. Nothing.
09-30-2012, 02:34 PM
Find




Users browsing this thread: 1 Guest(s)