FurtherGames
Member
Posts: 72
Threads: 23
Joined: Apr 2013
Reputation:
1
|
RE: Key Doesn't Unlock Door!
(05-01-2013, 12:54 PM)DeAngelo Wrote: Are you sure the key and door are named exactly as shown in your HPS? Sometimes even upper case and lower case makes a difference.
Yes, I assure you. Inside the level editor:
Key name: Key1
Door name: maison_Door
(I know this is spelt wrong)
I copied them from the level editor to the HPS File.
HPS File:
void OnStart()
{
AddUseItemCallback("", "Key1", "masion_Door", "DoorUnlockKey", true);
}
void OnEnter()
{
}
void OnLeave()
{
}
void DoorUnlockKey(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("masion_Door", false);
PlayGuiSound("unlock.door.snt", 100);
RemoveItem("Key1");
}
|
|
05-01-2013, 01:02 PM |
|