Frictional Games Forum (read-only)

Full Version: Swing Door Locked Text?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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
Screenshot the "entity" tab of your door and post your lang file please.

The category for your door MUST be "Levels".
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)
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.
Ninjaaaaa.

Might as well put asEntity in the check locked question.
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
There's no int script named GetSwingDoorLocked2 and <CellarDoor> needs to be written with quotes ("CellarDoor")

Code:
if(GetSwingDoorLocked("CellarDoor") == true)
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.
Just do two GetSwingDoorLocked? It doesn't matter if there's two existing already.
w but i still get the same Error.
Unexpected IF...
Pages: 1 2