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
Help on locking level doors?
Wyz Offline
Junior Member

Posts: 12
Threads: 3
Joined: Jul 2012
Reputation: 0
#12
RE: Help on locking level doors?

void OnStart()
{
SetPlayerLampOil(0);
PlayMusic("ambience_voice.ogg", true, 1, 5, 0, true);

//-------CALLBACKS-------
//////////////////////////

AddUseItemCallback("", "OldKey", "Atrium", "AtriumDoorUnlock", true);
}


//-------UNLOCKS-------
////////////////////////

void AtriumDoorUnlock(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("Atrium", false);
PlaySoundAtEntity("", "unlock_door", "Atrium", 0, false);
RemoveItem("OldKey");
}

That's the section that's supposed to unlock my door, I get a "cannot use item this way!" message when I use the key, but the door unlocks when I pick the key up. Thanks

Also, as I pick up the key, I can audibly hear the door unlock in the next room. Maybe it's the order of my script? Could I separate my AtriumDoorUnlock function to happen once I use the key?
(This post was last modified: 07-12-2012, 04:19 PM by Wyz.)
07-12-2012, 02:09 PM
Find


Messages In This Thread
Help on locking level doors? - by Wyz - 07-11-2012, 03:14 PM
RE: Help on locking level doors? - by Stepper321 - 07-11-2012, 03:30 PM
RE: Help on locking level doors? - by Wyz - 07-11-2012, 04:41 PM
RE: Help on locking level doors? - by Wyz - 07-11-2012, 09:04 PM
RE: Help on locking level doors? - by Wyz - 07-12-2012, 12:02 AM
RE: Help on locking level doors? - by Wyz - 07-12-2012, 12:26 AM
RE: Help on locking level doors? - by Cruzore - 07-12-2012, 01:02 AM
RE: Help on locking level doors? - by Wyz - 07-12-2012, 02:09 PM
RE: Help on locking level doors? - by Wyz - 07-12-2012, 04:19 PM
RE: Help on locking level doors? - by Wyz - 07-12-2012, 09:10 PM



Users browsing this thread: 4 Guest(s)