![]() |
** SOLVED ** Key Doesn't Unlock Door! - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: ** SOLVED ** Key Doesn't Unlock Door! (/thread-21349.html) Pages:
1
2
|
RE: Key Doesn't Unlock Door! - DeAngelo - 05-01-2013 Then you're using the wrong script. Change SetLevelDoorLocked("masion_Door", false); to SetSwingDoorLocked("masion_Door", false, true); RE: Key Doesn't Unlock Door! - Kullin - 05-01-2013 You Should not have the function on the void on leave section, both Should be on void on start ![]() RE: Key Doesn't Unlock Door! - DeAngelo - 05-01-2013 (05-01-2013, 01:17 PM)Kullin Wrote: You Should not have the function on the void on leave section, both Should be on void on start 1: he doesn't have it in his onleave section 2: If he put it in the OnStart section, it would unlock the door the moment he starts the map, not when he uses the key. RE: Key Doesn't Unlock Door! - FurtherGames - 05-01-2013 (05-01-2013, 01:12 PM)DeAngelo Wrote: This is probably a dumb question, but are you sure that your door is a level door and not just a regular swing door? Barring that, it may be best to just upload your level in a zip so that someone can take a look hands on at the level and the HPS file. Right, so I went over it. I was using the wrong scripts to unlock a swing door, but now I have another problem. Whenever I try to load my custom story, this error comes up; FATAL ERROR: Could not load script file 'custom_stories/Razors/maps/01_Motel.hps'! main (20, 2) : ERR : Unexpected end of file My HPS FILE: void OnStart() { AddUseItemCallback("", "Key1", "masion_Door", "FUNCTION", true); } void OnEnter() { } void OnLeave() { } void FUNCTION(string &in asItem, string &in asEntity) { SetSwingDoorLocked("masion_Door", false); PlaySoundAtEntity("unlock_door.snt", unlock_door", asEntity, 100, false); RemoveItem("item"); } (05-01-2013, 01:19 PM)DeAngelo Wrote:(05-01-2013, 01:17 PM)Kullin Wrote: You Should not have the function on the void on leave section, both Should be on void on start THANK YOU SO MUCH!! It finally works! I have my key name, key desc, my description and the key unlocks the door! Thank you! ![]() |