Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Gametee


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Swing Door Locked Text?
Author Message
Amnesiaplayer Offline
Senior Member

Posts: 539
Joined: Jun 2014
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Romulator Online
G'day mate! :3

Posts: 3,458
Joined: Jan 2013
Reputation: 191
Post: #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#4942
09-23-2014 02:51 PM
Find all posts by this user Quote this message in a reply
Amnesiaplayer Offline
Senior Member

Posts: 539
Joined: Jun 2014
Reputation: 0
Post: #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 File(s)
.jpg  Untitled.jpg (Size: 376.09 KB / Downloads: 12)
09-23-2014 03:41 PM
Find all posts by this user Quote this message in a reply
Romulator Online
G'day mate! :3

Posts: 3,458
Joined: Jan 2013
Reputation: 191
Post: #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#4942
09-23-2014 03:51 PM
Find all posts by this user Quote this message in a reply
Mudbill Offline
Posting Freak

Posts: 3,527
Joined: Apr 2013
Reputation: 166
Post: #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 all posts by this user Quote this message in a reply
Amnesiaplayer Offline
Senior Member

Posts: 539
Joined: Jun 2014
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Neelke Offline
Senior Member

Posts: 666
Joined: Apr 2013
Reputation: 26
Post: #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 all posts by this user Quote this message in a reply
Amnesiaplayer Offline
Senior Member

Posts: 539
Joined: Jun 2014
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Neelke Offline
Senior Member

Posts: 666
Joined: Apr 2013
Reputation: 26
Post: #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 all posts by this user Quote this message in a reply
Amnesiaplayer Offline
Senior Member

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

w but i still get the same Error.
Unexpected IF...
09-23-2014 05:06 PM
Find all posts by this user Quote this message in a reply
Post Reply 


[-]
Quick Reply
Message
Type your reply to this message here.

Please answer:



User(s) browsing this thread: 1 Guest(s)