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]Key wont unlock door
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#2
RE: [help]Key wont unlock door

In level editor:


1. click the key
2. click entity from keys properties
3. there is "CallbackFunc", write there "useexit"
4. there is also "CustomSubItemTypeName", write there "monsterdoorkey" <--(this is for .lang file)




copy that to your hps file
Spoiler below!


void OnStart()
{
AddUseItemCallback("useexit", "monsterdoorkey", "monsterdoor", "UsedKeyOnDoor", true);
}



void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("monsterdoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "monsterdoor", 0.0f, false);
RemoveItem("monsterdoorkey");
}





When Life No Longer Exists
Full-conversion mod
(This post was last modified: 10-23-2011, 11:59 AM by Unearthlybrutal.)
10-23-2011, 11:49 AM
Website Find


Messages In This Thread
[help]Key wont unlock door - by Lemorz56 - 10-23-2011, 11:01 AM
RE: [help]Key wont unlock door - by Unearthlybrutal - 10-23-2011, 11:49 AM
RE: [help]Key wont unlock door - by Lemorz56 - 10-23-2011, 12:13 PM



Users browsing this thread: 1 Guest(s)