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
Prison section door close?
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#3
RE: Prison section door close?

It's a swing door. But it's different from the others in that it doesn't auto-close and has another latch for the padlock.

PHP Code: (Select All)
void OnStart()
{
AddUseItemCallback("""padlock1""prison_section_1""UsePadlock1"false);
}

void UsePadlock1(string &in asItemstring &in asEntity)
{
    if (
GetSwingDoorClosed("prison_section_1") == true)
    {
        
SetSwingDoorLocked("prison_section_1"truetrue);
        
PlaySoundAtEntity("""lock_door""prison_section_1"0false);
        
SetEntityActive("padlock_1"true);
        
RemoveItem("padlock1");
    }
    else
    {
        
SetMessage("Ch05Misc""dooropen"0);
    }


Basically it's playing the "dooropen" message even after I've closed the door and the latch. And to head off any questions, I have also tried simply "if (GetSwingDoorClosed("prison_section_1"))" but I get the same result.

(This post was last modified: 10-18-2012, 06:55 AM by Damascus.)
10-18-2012, 06:53 AM
Find


Messages In This Thread
Prison section door close? - by Damascus - 10-18-2012, 06:22 AM
RE: Prison section door close? - by The chaser - 10-18-2012, 06:44 AM
RE: Prison section door close? - by Damascus - 10-18-2012, 06:53 AM
RE: Prison section door close? - by Damascus - 10-18-2012, 08:01 AM



Users browsing this thread: 1 Guest(s)