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 Help Unlock Door by picking up the lantern [Solved]
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#4
RE: Unlock Door by picking up the lantern

Spoiler below!

PHP Code: (Select All)
void OnStart()
{
SetEntityCallbackFunc("Lantern""OpenDoor");
SetLocalVarInt("Door"0);
}

void OpenDoor(string &in asEntitystring &in type
{
AddLocalVarInt("Door"1);
CheckLocal();
}

void CheckLocal()
{
if (
GetLocalVarInt("Door") == 1)
{
SetSwingDoorLocked("DoorName"falsetrue);
}



"Veni, vidi, vici."
"I came, I saw, I conquered."
04-21-2014, 07:14 AM
Find


Messages In This Thread
RE: Unlock Door by picking up the lantern - by PutraenusAlivius - 04-21-2014, 07:14 AM



Users browsing this thread: 1 Guest(s)