Frictional Games Forum (read-only)
[SCRIPT] Normal Door 'Locked Text - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Normal Door 'Locked Text (/thread-20310.html)



Normal Door 'Locked Text - VeNoMzTeamHysterical - 02-13-2013

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?


RE: Normal Door 'Locked Text - FlawlessHappiness - 02-13-2013

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.


RE: Normal Door 'Locked Text - VeNoMzTeamHysterical - 02-13-2013

(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>


RE: Normal Door 'Locked Text - FlawlessHappiness - 02-13-2013

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


RE: Normal Door 'Locked Text - VeNoMzTeamHysterical - 02-13-2013

(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>


RE: Normal Door 'Locked Text - FlawlessHappiness - 02-13-2013

Then get it again! Big Grin


RE: Normal Door 'Locked Text - VeNoMzTeamHysterical - 02-13-2013

(02-13-2013, 10:06 PM)BeeKayK Wrote: Then get it again! Big Grin

hehe i will try to Tongue