Frictional Games Forum (read-only)

Full Version: Normal Door 'Locked Text
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So hey everyone i know how to make a locked text on a level door...

But how does that works on a normal door....

I am using a Mansion door it needs a key to open i want a text that show up...

You need a key to enter the dinner room.

Anyone knows how to make that?
in the interaction tab (in the editor, when you click the door) write "DoorLocked".

Then in your script write this function:

void DoorLocked(string &in asEntity)
{
if(GetSwingDoorLocked(asEntity)
{
SetMessages("MessageCategory", "MessageEntry", 0);
}
}

Change MessageCategory and MessageEntry to whatever is in your .lang file under messages.

You can now write "DoorLocked" in every interaction tab (In swingdoors), to make it set the message if it's locked.
(02-13-2013, 09:24 PM)BeeKayK Wrote: [ -> ]in the interaction tab (in the editor, when you click the door) write "DoorLocked".

Then in your script write this function:

void DoorLocked(string &in asEntity)
{
if(GetSwingDoorLocked(asEntity)
{
SetMessages("MessageCategory", "MessageEntry", 0);
}
}

Change MessageCategory and MessageEntry to whatever is in your .lang file under messages.

You can now write "DoorLocked" in every interaction tab (In swingdoors), to make it set the message if it's locked.


i got this? if im correct?

void DoorLocked(string &in asEntity)
{
if(GetSwingDoorLocked(asEntity)
{
SetMessages("Messages", "dinnerdoor", 0);
}
}

LANG:

<Entry Name="dinnerdoor">I need a key to enter the Dining Room.</Entry>
if that is your whole .LANG file then it's wrong.
But the entry and the script looks fine Smile

Though if you write it like that, it will say dinner door at every door that is locked (where you put the script).
Why not instead write "It's locked", and then give the player a quest: AddQuest (Which is a memento), that says "I need a key to enter the Dining Room."?
That would be better i think
(02-13-2013, 09:49 PM)BeeKayK Wrote: [ -> ]if that is your whole .LANG file then it's wrong.
But the entry and the script looks fine Smile

Though if you write it like that, it will say dinner door at every door that is locked (where you put the script).
Why not instead write "It's locked", and then give the player a quest: AddQuest (Which is a memento), that says "I need a key to enter the Dining Room."?
That would be better i think

Ye but i didn't scripted for 4 months and i kinda lost all that scripting out of my head ;(

this is the hole lang.

<LANGUAGE>
<RESOURCES>
</RESOURCES>
<CATEGORY Name="Messages">
<Entry Name="SignArea_1">This is a grave....[br]Someone had died here.</Entry>
<Entry Name="SignArea_2">What another grave,[br]Im not sure what kind of family this is.[br]But it has long generations.</Entry>
<Entry Name="doormyhouse">What its locked.....[br]SHIT my key is still inside...</Entry>
<Entry Name="Message1">My neighbors a key,I gave it a long time ago.</Entry>
<Entry Name="doordungeon">I need a key to enter the Dungeon.</Entry>
<Entry Name="cryptdoor">I need a key to enter the Crypt.</Entry>
<Entry Name="dinnerdoor">I need a key to enter the Dining Room.</Entry>
<Entry Name="kitchen">Kitchen.</Entry>
</CATEGORY>
</LANGUAGE>
Then get it again! Big Grin
(02-13-2013, 10:06 PM)BeeKayK Wrote: [ -> ]Then get it again! Big Grin

hehe i will try to Tongue