Frictional Games Forum (read-only)
Swing 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 (https://www.frictionalgames.com/forum/forum-35.html)
+---- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-37.html)
+---- Thread: Swing Door Locked Text? (/thread-26286.html)

Pages: 1 2


Swing Door Locked Text? - Amnesiaplayer - 09-23-2014

I knew this already! and i had this in one of my old custom Storiess (deleted)
but i really forgot How to do this!
i tried everything ?
my door namei s
CellarDoor
I put it in LANG ENGLISH file.. Under SIGNS
but i don't see a coming text ?? Sad
I know this for Level doors... They have Like Text Cat blabla so i can do that... but i really forgot this one... I tried everything Sad


RE: Swing Door Locked Text? - Romulator - 09-23-2014

Screenshot the "entity" tab of your door and post your lang file please.

The category for your door MUST be "Levels".


RE: Swing Door Locked Text? - Amnesiaplayer - 09-23-2014

huh... the place SIGN is good to ? right...
so if i click on a Door (level) i can get the message i write... but
it doesn't work on the SWING doors... the normal doors... Here a Picture...

And my Lang fiel (only the SIGN place)
PHP Code:
<CATEGORY Name="Sign">
                <
Entry Name="Door">The door is locked.</Entry>
                <
Entry Name="Door2">This door is lockedI think i can go to the Mall through this house..</Entry>
                <
Entry Name="CellarDoor">The boards are blocking the doorMaybe i need a hammer?</Entry>
                <
Entry Name="CellarDoor2">The door doesn't have a lock? So i don't need a key for itBut what do i need then?</Entry>
                <
Entry Name="Sign">I don't have to go upstairs.</Entry>
                <Entry Name="Sign2"></Entry>
                <Entry Name="Sign3"></Entry>
                <Entry Name="Sign4"></Entry>
                <Entry Name="Sign5"></Entry>
                <Entry Name="Sign6"></Entry>
                <Entry Name="Sign7">The tv is red. That means the electricity is off. you can turn it on in the basement. (if the tv is green it means the electricity is on.)</Entry>
                <Entry Name="Sign8">Machine Parts.</Entry> 

The only Thing i need to get on my screen is the
CellarDoor

( the other sign things 2,3,4,5,6 Are Unused (deleted)


RE: Swing Door Locked Text? - Romulator - 09-23-2014

Oh okay - Swing Doors.

What we do here is use SetMessage();
We check if the door is locked, and then if so, display a message, otherwise, we do not.

This should work, if placed in the appropriate callback function. The one we would use is SetPlayerEntityInteractCallback, or PlayerInteractCallback as used in the Level Editor.

PHP Code:
if(GetSwingDoorLocked(<door_name>) == true)
{
SetMessage("Sign""CellarDoor"0);


Using this, we find out if the door is locked. If so, it will display the message in CellarDoor. Just make sure to change <door_name> to the name of your door in the Level Editor, from the General tab.


RE: Swing Door Locked Text? - Mudbill - 09-23-2014

Ninjaaaaa.

Might as well put asEntity in the check locked question.


RE: Swing Door Locked Text? - Amnesiaplayer - 09-23-2014

Thanks... but i got an other problem?
it says on the first time Unexpected token IF
and if i delete that there will come Expected ;
and if i do that it says Unexpected {
... Where do i have to play ?! and my first function is this :

SetEntityPlayerInteractCallback("CellarDoor", "GetSwingDoorLocked", false);

if(GetSwingDoorLocked2(<CellarDoor>) == true)
{
SetMessage("Sign", "CellarDoor", 0);
}

Sad


RE: Swing Door Locked Text? - Neelke - 09-23-2014

There's no int script named GetSwingDoorLocked2 and <CellarDoor> needs to be written with quotes ("CellarDoor")

Code:
if(GetSwingDoorLocked("CellarDoor") == true)



RE: Swing Door Locked Text? - Amnesiaplayer - 09-23-2014

but i have 2 Cellar Doors.. the first is named GetSwingDoorLocked the second GetSwingDoorLocked2 Tongue so that isi mpossible?

Edit : i did it. It tells Unexpected IF
(the Sentence where if(GetSwingDoorLocked("CellarDoor") == true) is.


RE: Swing Door Locked Text? - Neelke - 09-23-2014

Just do two GetSwingDoorLocked? It doesn't matter if there's two existing already.


RE: Swing Door Locked Text? - Amnesiaplayer - 09-23-2014

w but i still get the same Error.
Unexpected IF...