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
.Lang File Help Text on locked Swing-Door [Solved]
Wafflychicken Offline
Junior Member

Posts: 13
Threads: 3
Joined: Apr 2014
Reputation: 1
#5
RE: Text on locked Swing-Door

(04-20-2014, 06:29 PM)ShipinShen Wrote:
(04-20-2014, 06:20 PM)Wafflychicken Wrote:
(04-20-2014, 06:08 PM)ShipinShen Wrote: Hey i'm new on this platform but i'm despairing, because a problem i have with my custom story.

I want to show text, when i'm trying to open a locked mansionbase door (not a leveldoor). I followed these instructions (http://wiki.frictionalgames.com/hpl2/tut...ked_doors) and i used the same prefixes as in the tutorial but it doesnt work. After i asked some guys, who can script really good they dont know how to solve it. Here is our currently progress.

extra_english.lang file; Just pay attention on the ///Message/// category, the rest is working fine:

<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">You are returning from your education and you are looking forward to have a cozy evening with your family.[br][br]But wait...[br][br][br]You get a strange feeling as you behold the estate of your family.</Entry>
</CATEGORY>


//////////////////////JOURNAL//////////////////////

<CATEGORY Name="Journal">
<Entry Name="Note_NoteTraum1_Name">Enter Text here.</Entry>
<Entry Name="Note_NoteTraum1_Text">Your now reading the test text.</Entry>
</CATEGORY>


//////////////////////INVENTORY//////////////////////

<CATEGORY Name="Inventory">
<Entry Name="ItemName_KeyDesc">Desk-Key</Entry>
<Entry Name="ItemDesc_KeyDesc">It's for unlocking the desk door.</Entry>
</CATEGORY>


//////////////////////DEATHHINT//////////////////////

<CATEGORY Name="DeathHint">
<Entry Name="Entry1">You have to carry on...</Entry>
</CATEGORY>


//////////////////////MESSAGES//////////////////////

<CATEGORY Name=“Messages”>
<Entry Name =“msgname”>It's dark outside. I should take my lantern.</Entry>
</CATEGORY>
</LANGUAGE>



map.hps; just the script for the message:

//Text on locked door
void DoorLockedPlayer(string &in entity)


{
if(GetSwingDoorLocked(entity) == true)
{

SetMessage("Messages", "msgname", 3);

}
}


//we also tried this but it wont work too

//Text on locked door
void DoorLockedPlayer(string &in entity)


{
if(GetSwingDoorLocked("EXAMPLE_DOOR") == true)
{

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

}
}


The Door Name in the mapeditor is "EXAMPLE_DOOR" and the PlayerInteractCallback is "DoorLockedPlayer"

Hope anyone can help me, thanks Smile

Hey I don't know if it's just me but in your .lang file the category messages quotes look inverted, try deleting them and putting correct quotes in Smile

There we GO !!!!! Thanks so much, i was trying to solve this problem for hours. Thanks man <3 !!

(04-20-2014, 06:23 PM)Lizard Wrote: in your lang file you have a space between Name and the = sign, which isn't supposed to be their

That's right, thanks, but the main problem was the quotes, they was inverted, because i copy&pasted it from the tutorial Smile

Haha the same thing happened to me spending hours on it then realising it was the brackets, just remember if there is an error within the custom story and no error message is being shown its most likely because there is a problem in the Lang file as it doesn't show errors even if there are -_-
04-20-2014, 06:37 PM
Find


Messages In This Thread
RE: Text on locked Swing-Door - by Wafflychicken - 04-20-2014, 06:20 PM
RE: Text on locked Swing-Door - by ShipinShen - 04-20-2014, 06:29 PM
RE: Text on locked Swing-Door - by Wafflychicken - 04-20-2014, 06:37 PM
RE: Text on locked Swing-Door - by Lizard - 04-20-2014, 06:23 PM



Users browsing this thread: 1 Guest(s)