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


Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Crowbar unlocks a closet, doesen't work.
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#5
RE: Crowbar unlocks a closet, doesen't work.

void OnStart()
{
AddUseItemCallback("", "CrowbarForCabinet", "cabinet", "OpenCabinetDoor", true);
}

void OpenCabinetDoor(string &in asItem, string &in asEntity) // changed (string &in door) to (string &in asEntity)
{
SetSwingDoorLocked("cabinet", false, true); ///missing quotes on cabinet
PlaySoundAtEntity("", "unlock_door", "cabinet", 0, false); ///missing quotes on cabinet
RemoveItem("CrowbarForCabinet"); //missing quotes on CrowbarForCabinet
}


void CeilingDoorLocked(string &in entity)
{
if(GetSwingDoorLocked("CeilingDoor") == true)
{
SetMessage("Messages", "PopupCeilingDoor", 0);
}
}

I rate it 3 memes.
06-18-2012, 11:58 AM
Find


Messages In This Thread
RE: Crowbar unlocks a closet, doesen't work. - by Adny - 06-18-2012, 11:58 AM



Users browsing this thread: 1 Guest(s)