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
Text not appearing on door
Spaysh Offline
Junior Member

Posts: 11
Threads: 6
Joined: Feb 2013
Reputation: 0
#1
Text not appearing on door

Hey guys, just wondering why my doors won't display the messages when they are interacted by the player, the code for the map is
void LockedDoor1(string &in entity)
{
    if(GetSwingDoorLocked("Locked_Door_1") == true)
    {
        SetMessage("Message", "LockedDoor1msg", 0);
    }

}
void TortureDoorLocked(string &in entity)
{
    if(GetSwingDoorLocked("Torture_Door_1") == true)
    {
        SetMessage("Message", "TortureDoorLockedmsg", 0);
    }

}
void MonsterDoorLocked(string &in entity)
{
    if(GetSwingDoorLocked("MonsterDoor") == true)
    {
        SetMessage("Message", "MonsterDoorLockedmsg", 0);
    }

}
and my extra_english.lang file looks like this
<LANGUAGE>
   <CATEGORY Name="CustomStoryMain">
      <Entry Name="Description">Trying out HPL Editor!</Entry>
   </CATEGORY>
   <CATEGORY Name="Inventory">
    <Entry Name="ItemDesc_Key1">Key to Cellar</Entry>
    <Entry Name="ItemName_Key1">Cellar Key</Entry>
    <Entry Name="ItemDesc_crowbar>A sturdy crowbar used to pry doors</Entry>
    <Entry Name="ItemName_crowbar>Crowbar</Entry>
   </CATEGORY>
   <CATEGORY Name=“Message”>
    <Entry Name =“LockedDoor1msg”>This door is locked, maybe if I had a key...</Entry>
    <Entry Name =“MonsterDoorLockedmsg”>This door is locked with a mechanism.</Entry>
    <Entry Name =“TortureDoorLockedmsg”>This door is slightly locked, might be able to pry open...</Entry>
   </CATEGORY>
</LANGUAGE>
I have been looking at this for ages now and I still cannot see what is the problem, all the door names are spelt correctly, so its not that.
Any help is appreciated
02-07-2013, 02:54 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Text not appearing on door

You have the script wrong:

Your script:

void LockedDoor1(string &in entity)

{

    if(GetSwingDoorLocked("Locked_Door_1") == true)

    {

        SetMessage("Message", "LockedDoor1msg", 0);

    }



}

void TortureDoorLocked(string &in entity)

{

    if(GetSwingDoorLocked("Torture_Door_1") == true)

    {

        SetMessage("Message", "TortureDoorLockedmsg", 0);

    }



}

void MonsterDoorLocked(string &in entity)

{

    if(GetSwingDoorLocked("MonsterDoor") == true)

    {

        SetMessage("Message", "MonsterDoorLockedmsg", 0);

    }



}

It should be like:

void LockedDoor1(string &in Entity)

{

    if(GetSwingDoorLocked("Locked_Door_1") == true)

    {

        SetMessage("Message", "LockedDoor1msg", 0);

    }



}

void TortureDoorLocked(string &in Entity)

{

    if(GetSwingDoorLocked("Torture_Door_1") == true)

    {

        SetMessage("Message", "TortureDoorLockedmsg", 0);

    }



}

void MonsterDoorLocked(string &in Entity)

{

    if(GetSwingDoorLocked("MonsterDoor") == true)

    {

        SetMessage("Message", "MonsterDoorLockedmsg", 0);

    }



}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
02-07-2013, 03:18 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#3
RE: Text not appearing on door

Using the Lang Editor, something is wrong. FYI, the Error is at Line 8, Position 69.
Here you go, bro.
PHP Code: (Select All)
<LANGUAGE>
  <
RESOURCES>
  </
RESOURCES>
  <
CATEGORY Name="CustomStoryMain">
    <
Entry Name="Description">Trying out HPL Editor!</Entry>
  </
CATEGORY>
  <
CATEGORY Name="Inventory">
    <
Entry Name="ItemDesc_Key1">Key to the Cellar</Entry>
    <
Entry Name="ItemName_Key1">Cellar Key</Entry>
    <
Entry Name="ItemDesc_crowbar">A sturdy crowbar used to pry doors</Entry>
    <
Entry Name="ItemName_crowbar">Crowbar</Entry>
  </
CATEGORY>
  <
CATEGORY Name="Message">
    <
Entry Name="MonsterDoorLockedmsg">This door is locked with a mechanism.</Entry>
    <
Entry Name="TortureDoorLockedmsg">This door is slightly lockedmight be able to pry open...</Entry>
    <
Entry Name="LockedDoor1msg">This door is lockedmaybe if I had a key...</Entry>
  </
CATEGORY>
</
LANGUAGE
Hope it helps.

(02-07-2013, 03:18 PM)The chaser Wrote: You have the script wrong:

Your script:

void LockedDoor1(string &in entity)

{

    if(GetSwingDoorLocked("Locked_Door_1") == true)

    {

        SetMessage("Message", "LockedDoor1msg", 0);

    }



}

void TortureDoorLocked(string &in entity)

{

    if(GetSwingDoorLocked("Torture_Door_1") == true)

    {

        SetMessage("Message", "TortureDoorLockedmsg", 0);

    }



}

void MonsterDoorLocked(string &in entity)

{

    if(GetSwingDoorLocked("MonsterDoor") == true)

    {

        SetMessage("Message", "MonsterDoorLockedmsg", 0);

    }



}

It should be like:

void LockedDoor1(string &in Entity)

{

    if(GetSwingDoorLocked("Locked_Door_1") == true)

    {

        SetMessage("Message", "LockedDoor1msg", 0);

    }



}

void TortureDoorLocked(string &in Entity)

{

    if(GetSwingDoorLocked("Torture_Door_1") == true)

    {

        SetMessage("Message", "TortureDoorLockedmsg", 0);

    }



}

void MonsterDoorLocked(string &in Entity)

{

    if(GetSwingDoorLocked("MonsterDoor") == true)

    {

        SetMessage("Message", "MonsterDoorLockedmsg", 0);

    }



}
Dear the chaser, something is wrong with his .lang file.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 02-07-2013, 03:27 PM by PutraenusAlivius.)
02-07-2013, 03:20 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#4
RE: Text not appearing on door

*Clears throat*

Ehem. I didn't see the error in the .lang file, but he had some Paremeters wrong (he just had "entity" instead "Entity").

With JustAnotherPlayer corrected .lang file and your fixed by me script, it should be fine.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
02-07-2013, 03:51 PM
Find
Spaysh Offline
Junior Member

Posts: 11
Threads: 6
Joined: Feb 2013
Reputation: 0
#5
RE: Text not appearing on door

Cheers guys, started all this monday so im still a little rusty xD
02-07-2013, 04:15 PM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#6
RE: Text not appearing on door

(02-07-2013, 03:51 PM)The chaser Wrote: ... but he had some Paremeters wrong (he just had "entity" instead "Entity").

As long as the types are correct, it shouldn't matter how you name the parameter

02-07-2013, 06:11 PM
Find




Users browsing this thread: 1 Guest(s)