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
Level Doors & Keys
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#2
RE: Level Doors & Keys

Keys can in fact open level doors, but level doors are very very different from swing doors.
You have to use SetLevelDoorLocked(string& asName, bool abLocked); instead of SetSwingDoorLocked.
Ex:
void OnStart()
{
AddUseItemCallback("", "nameofkey", "nameofleveldoor", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("nameofleveldoor", false);
SetLevelDoorLockedSound("nameofleveldoor", "door_level_wood_locked.snt");
RemoveItem("nameofkey");
}

Ba-da bing, ba-da boom.
(This post was last modified: 07-24-2011, 03:20 AM by JenniferOrange.)
07-24-2011, 03:09 AM
Find


Messages In This Thread
Level Doors & Keys - by Angerpull - 07-24-2011, 02:29 AM
RE: Level Doors & Keys - by JenniferOrange - 07-24-2011, 03:09 AM
RE: Level Doors & Keys - by Angerpull - 07-24-2011, 03:23 AM
RE: Level Doors & Keys - by JenniferOrange - 07-24-2011, 03:34 AM



Users browsing this thread: 2 Guest(s)