Frictional Games Forum (read-only)

Full Version: How to make a key open a level door?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a key that unlocks a level door, but when it does the door still remains locked? Here is the script I have.

AddUseItemCallback("", "level_key", "level_dungeon_1", "OpenLevel", true);
}

void OpenLevel(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("", false, true);
PlaySoundAtEntity("", "unlock_door", "level_dungeon_1", 0, false);
RemoveItem("level_key");
}
SetLevelDoorLocked("level_dungeon_1", false);
(08-04-2012, 01:11 AM)Harthex Wrote: [ -> ]SetLevelDoorLocked("level_dungeon_1", false);
Thanks a lot. Do I replace it with SetSwingDoorLocked? Or just add it on.
Yeah, replace it.