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
Key to a level door
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#4
RE: Key to a level door

(08-08-2013, 09:49 PM)MaTPlays Wrote: Not working, maybe I've got something wrong:
void OnStart()
{


AddUseItemCallback("", "Keymaindoor", "Door_1", "UseKeyOnDoor_1", true);
}


void UseKeyOnDoor_1(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}

void OnStart()
{


AddUseItemCallback("", "Keymaindoor", "Door_1", "UseKeyOnDoor_1", true);
}


void UseKeyOnDoor_1(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked(asEntity, false);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}

There, it should be fixed. It's:

SetLevelDoorLocked(string& asName, bool abLocked);
For swing doors:

SetSwingDoorLocked(string& asName, bool abLocked, bool abEffects);

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
08-08-2013, 10:25 PM
Find


Messages In This Thread
Key to a level door - by MaTPlays - 08-08-2013, 09:32 PM
RE: Key to a level door - by DeAngelo - 08-08-2013, 09:38 PM
RE: Key to a level door - by MaTPlays - 08-08-2013, 09:49 PM
RE: Key to a level door - by The chaser - 08-08-2013, 10:25 PM
RE: Key to a level door - by MaTPlays - 08-08-2013, 10:36 PM
RE: Key to a level door - by The chaser - 08-08-2013, 11:07 PM
RE: Key to a level door - by Tomato Cat - 08-09-2013, 12:08 AM
RE: Key to a level door - by MaTPlays - 08-08-2013, 11:10 PM
RE: Key to a level door - by The chaser - 08-09-2013, 11:20 AM
RE: Key to a level door - by MaTPlays - 08-09-2013, 07:18 PM



Users browsing this thread: 1 Guest(s)