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
How to make a make a door that need two keys to unlock it?
Raymond Offline
Member

Posts: 126
Threads: 24
Joined: Feb 2011
Reputation: 0
#17
RE: How to make a make a door that need two keys to unlock it?

Now the it doesn't have effects, my .hps is like this:
void Onstart()
{
AddUseItemCallback("UseKey1", "prisonkeylight_1", "mansion_3", "KeyCounter", true);
SetLocalVarInt("KeysUsed", 0);
AddUseItemCallback("UseKey2", "prisonkeydark_1", "mansion_3", "KeyCounter", true);
}

void KeyCounter(string &in asItem, string &in asEntity)
{
AddLocalVarInt("KeysUsed", 1);
if(GetLocalVarInt("KeysUsed")==2)
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
}

I use the first key and it says: "Cannot Use This Item Away!" Could someone please help?

One World To Another [DEMO] coming soon.
03-16-2011, 07:22 AM
Find


Messages In This Thread
RE: How to make a make a door that need two keys to unlock it? - by Raymond - 03-16-2011, 07:22 AM



Users browsing this thread: 2 Guest(s)