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
Script to add message to a locked swing door
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#2
RE: Script to add message to a locked swing door

(02-04-2012, 11:14 AM)Ninami Wrote: Hey guys, been searching quite a while for a solution but I can't find it.

I have a swing door in a room which is locked. When you try to open it I want a message to appear, something like "The door is locked".

I tried the "SetLevelDoorLockedText" but I learned that it only works on level doors.

What do I script in order to do the exact same thing, but on swing doors?

Cheers Ninami
Now I tried adding:

SetEntityPlayerInteractCallback("Door_1", "LockedDoor", false);


void LockedDoor(string &in asEntity)
{
SetMessage("Messages", "DoorLocked", 2);
}

But nothing happens when I interact with the door.

AND, if this would work, it still would show the message even though the door was unlocked...right?
Here's the one i use it's for a level door but i guess it will work the same Smile

void OnStart()
{
    SetLocalVarInt("DoorLocked", 1);
    SetEntityPlayerInteractCallback("NAMEOFDOORHERE", "TextLockedDoor", false);
}

void TextLockedDoor(string &in asEntity)
{
    if(GetLocalVarInt("DoorLocked") == 1){
        SetMessage("Message", "NAMEOFENTRY", 3);
    }
}


02-04-2012, 12:55 PM
Find


Messages In This Thread
RE: Script to add message to a locked swing door - by SilentStriker - 02-04-2012, 12:55 PM



Users browsing this thread: 4 Guest(s)