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]
ShipinShen Offline
Junior Member

Posts: 23
Threads: 7
Joined: Apr 2014
Reputation: 0
#1
Text on locked Swing-Door [Solved]

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

ShipinShen - YouTube
(This post was last modified: 04-20-2014, 06:39 PM by ShipinShen.)
04-20-2014, 06:08 PM
Find
Wafflychicken Offline
Junior Member

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

(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
04-20-2014, 06:20 PM
Find
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#3
RE: Text on locked Swing-Door

in your lang file you have a space between Name and the = sign, which isn't supposed to be their

CURRENT PROJECT:
A Fathers Secret == Just started
04-20-2014, 06:23 PM
Find
ShipinShen Offline
Junior Member

Posts: 23
Threads: 7
Joined: Apr 2014
Reputation: 0
#4
Exclamation  RE: Text on locked Swing-Door

(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

ShipinShen - YouTube
(This post was last modified: 04-20-2014, 06:30 PM by ShipinShen.)
04-20-2014, 06:29 PM
Find
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
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#6
RE: Text on locked Swing-Door [Solved]

(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 actually doesn't make anything wrong. You can even do that with the HPS. We just do that because it looked more neater.

"Veni, vidi, vici."
"I came, I saw, I conquered."
04-21-2014, 12:49 AM
Find




Users browsing this thread: 2 Guest(s)