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
Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie)
Frodos Offline
Junior Member

Posts: 28
Threads: 7
Joined: Sep 2012
Reputation: 0
#1
Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie)

Hello,

In my extra_english.lang file, I already have a code for a message on one of my notes to appear. It works perfectly fine and there is no problem with that whatsoever.

However.

I am trying to make a message appear to the player when they try to open a locked door, this guide told me the following:

First of all, open up your extra_english.lang file, and add this:

TYPE MESSAGE HERE




I followed those instructions perfectly, editing the certain sections to put my own messages in etc. I also followed the instructions he told me for the mapname.hps file.
When I edited the extra_english.lang, I put the new code underneath of the first one. When I went in the game, now neither of the codes worked, the message didn't appear and the note was blank. Was me putting this code in the same file as the note code causing this problem?


Anyone know what's going on?


Thank you

Veteran Writer

Need help with your CS plot? PM me!

Noob Scripter, need help PM me.




(This post was last modified: 09-04-2012, 03:17 AM by Frodos.)
09-03-2012, 12:15 AM
Find
Zaffre Away
Posting Freak

Posts: 867
Threads: 50
Joined: Jul 2012
Reputation: 30
#2
RE: Problem with "extra_english.lang"

Hm... your file seems to be lacking in some parts. Here's how it should be written.

<LANGUAGE>
<CATEGORY Name="Messages">
<Entry Name="lockeddoor1">This door is locked.
</CATEGORY>
</LANGUAGE>

You also need the appropriate coding. For instance, let's presume that the name of a door is "mansion_1", and you want it to display the callback. You'll need to type this.

void OnStart()
{
SetEntityPlayerInteractCallback("mansion_1", "DoorLockedMsg", true);
}

void DoorLockedMsg(string &in entity)
{
SetMessage("Messages", "lockeddoor1", 0);
}

It helps if you can explain the coding like it would be in a conversation. What this code says is that when the map starts, it will add a callback for interacting with the door named "mansion_1". That callback asks the category "Messages" in the file "extra_english.lang", to display the entry "lockeddoor1" for a predetermined amount of time.

This should work. Also, if the coding is correct, check for typos in your extra_english.lang file. I often forget to put quotes or the </Entry> after I finish an entry.

Hope this helps.

As of September 2nd, 2014, I've left the Frictional forums. Check my profile for more details.
09-03-2012, 01:58 AM
Find
Kazakarumariou Away
An angry man.

Posts: 283
Threads: 8
Joined: Jul 2012
Reputation: 14
#3
RE: Problem with "extra_english.lang"

Also Those quotes aren't any good Just use " and " instead of
“ and ”
09-03-2012, 02:08 AM
Find
Frodos Offline
Junior Member

Posts: 28
Threads: 7
Joined: Sep 2012
Reputation: 0
#4
RE: Problem with "extra_english.lang"

I used your technique Zaffre, it didn't seem to work for me, I tried some others they didn't work either.

This is what I have in my extra_english.lang file:






<LANGUAGE>
<CATEGORY Name=“Messages”>
<Entry Name =“lockeddoor1”>The door is locked from the outside, maybe there's another way out of here.</Entry>
</CATEGORY>
</LANGUAGE>




This is what I have in the hps file:


void DoorLockedPlayer(string &in entity)


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

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

}
}


I also set the name of the door and etc in the level editor

Do you happen to see the problem?

Veteran Writer

Need help with your CS plot? PM me!

Noob Scripter, need help PM me.




(This post was last modified: 09-03-2012, 02:27 AM by Frodos.)
09-03-2012, 02:26 AM
Find
Zaffre Away
Posting Freak

Posts: 867
Threads: 50
Joined: Jul 2012
Reputation: 30
#5
RE: Problem with "extra_english.lang"

(09-03-2012, 02:26 AM)Frodos Wrote: I used your technique Zaffre, it didn't seem to work for me, I tried some others they didn't work either.

This is what I have in my extra_english.lang file:






<LANGUAGE>
<CATEGORY Name=“Messages”>
<Entry Name =“lockeddoor1”>The door is locked from the outside, maybe there's another way out of here.</Entry>
</CATEGORY>
</LANGUAGE>




This is what I have in the hps file:


void DoorLockedPlayer(string &in entity)


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

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

}
}


I also set the name of the door and etc in the level editor

Do you happen to see the problem?
Yes. In the entry name, you have a space between the word "name" and the quotations. It should be like this. Also, I've bolded the part with the error.

<LANGUAGE>
<CATEGORY Name=“Messages”>
<Entry Name=“lockeddoor1”>The door is locked from the outside, maybe there's another way out of here.</Entry>
</CATEGORY>
</LANGUAGE>

As of September 2nd, 2014, I've left the Frictional forums. Check my profile for more details.
09-03-2012, 02:53 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Problem with "extra_english.lang"

Don't skip over post three.

Tutorials: From Noob to Pro
09-03-2012, 02:55 AM
Website Find
Frodos Offline
Junior Member

Posts: 28
Threads: 7
Joined: Sep 2012
Reputation: 0
#7
RE: Problem with "extra_english.lang"

I've done everything you guys have suggested, I fixed all the quotations and I fixed the Entry Name section, although it still does not work.

extra_english.lang:


<LANGUAGE>
<CATEGORY Name="Messages">
<Entry Name="lockeddoor">The door is locked from the outside, maybe there is another way out of here.</Entry>
</CATEGORY>
</LANGUAGE>

hps file:



void DoorLockedPlayer(string &in entity)


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

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

}
}


Also note that in the hps file, that is ALL I have. That's the only thing in the hps file, nothing else, is there something else that should be in there? Is that my problem?

Veteran Writer

Need help with your CS plot? PM me!

Noob Scripter, need help PM me.




09-03-2012, 03:56 AM
Find
Zaffre Away
Posting Freak

Posts: 867
Threads: 50
Joined: Jul 2012
Reputation: 30
#8
RE: Problem with "extra_english.lang"

Yes, the .hps file is botched. I could explain it but I have a bad headache and I need to get some sleep. If it isn't resolved by tomorrow, I'll try and help you.

As of September 2nd, 2014, I've left the Frictional forums. Check my profile for more details.
09-03-2012, 04:22 AM
Find
Frodos Offline
Junior Member

Posts: 28
Threads: 7
Joined: Sep 2012
Reputation: 0
#9
RE: Problem with "extra_english.lang"

(09-03-2012, 04:22 AM)Zaffre Wrote: Yes, the .hps file is botched. I could explain it but I have a bad headache and I need to get some sleep. If it isn't resolved by tomorrow, I'll try and help you.
Okay, that's no problem, sounds good, I can wait a day, especially after all the help you've given me!

(you too YouComputer and Harthex!)

Though, if anyone is still here and willing to help, I should be online for 1 - 2 more hours.

Veteran Writer

Need help with your CS plot? PM me!

Noob Scripter, need help PM me.




09-03-2012, 04:29 AM
Find
Kazakarumariou Away
An angry man.

Posts: 283
Threads: 8
Joined: Jul 2012
Reputation: 14
#10
RE: Problem with "extra_english.lang"

make sure you have the hps and the map file in a folder in the custom story folder named "maps" or whatever your custom story settings have it set to.
09-03-2012, 05:59 AM
Find




Users browsing this thread: 1 Guest(s)