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
Swing Door Locked Text?
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#1
Swing Door Locked Text?

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
09-23-2014, 02:29 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: Swing Door Locked Text?

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

The category for your door MUST be "Levels".

Discord: Romulator#0001
[Image: 3f6f01a904.png]
09-23-2014, 02:51 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#3
RE: Swing Door Locked Text?

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: (Select All)
<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)


Attached Files
.jpg   Untitled.jpg (Size: 376.09 KB / Downloads: 140)
09-23-2014, 03:41 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#4
RE: Swing Door Locked Text?

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: (Select All)
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.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
09-23-2014, 03:51 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#5
RE: Swing Door Locked Text?

Ninjaaaaa.

Might as well put asEntity in the check locked question.

(This post was last modified: 09-23-2014, 03:55 PM by Mudbill.)
09-23-2014, 03:54 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#6
RE: Swing Door Locked Text?

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
09-23-2014, 04:21 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#7
RE: Swing Door Locked Text?

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

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

Derp.
09-23-2014, 04:27 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#8
RE: Swing Door Locked Text?

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.
(This post was last modified: 09-23-2014, 04:31 PM by Amnesiaplayer.)
09-23-2014, 04:29 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#9
RE: Swing Door Locked Text?

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

Derp.
09-23-2014, 05:01 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#10
RE: Swing Door Locked Text?

w but i still get the same Error.
Unexpected IF...
09-23-2014, 05:06 PM
Find




Users browsing this thread: 1 Guest(s)