[CONFIG] Level Doors Dosnt work when locked... - 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: [CONFIG] Level Doors Dosnt work when locked... (/thread-12560.html) |
Level Doors Dosnt work when locked... - jessehmusic - 01-12-2012 why does my level doors stop wokring when i have it on locked... cant get it to work RE: Level Doors Dosnt work when locked... - Datguy5 - 01-12-2012 ....Because they are locked like normal doors.You need a key,button or something else to unlock it..If thats what you mean. RE: Level Doors Dosnt work when locked... - jessehmusic - 01-12-2012 I have made keys scripted them and that sh** RE: Level Doors Dosnt work when locked... - Datguy5 - 01-12-2012 Show us the script. RE: Level Doors Dosnt work when locked... - jessehmusic - 01-12-2012 PHP Code: void OnStart(){AddUseItemCallback("", "Cell Door Key", "Lockeddoor_2", "KeyOnDoor2", true); RE: Level Doors Dosnt work when locked... - Datguy5 - 01-12-2012 I think it should be like this AddUseItemCallback("", "Cell Door Key", "Lockeddoor_2", "KeyOnDoor2", true); } void KeyOnDoor2(string &in asItem, string &in asEntity) { SetSwingDoorLocked("Lockeddoor_2", false, true); PlaySoundAtEntity("", "unlock_door", "Lockeddoor_2", 0, false); RemoveItem("Cell Door Key"); SetPropHealth("Lockeddoor_2", 0); } RE: Level Doors Dosnt work when locked... - Tripication - 01-13-2012 (01-12-2012, 05:18 PM)Datguy5 Wrote: I think it should be like thisWhy do you have setprophealth, you shouldn't need it at all, nt for unlocking a door. _______________________________ Oh right, and the solve,You used the wrong callback. Hang on void OnStart() { AddUseItemCallback("", "Cell Door Key", "Lockeddoor_2", "KeyOnDoor2", true); } void KeyOnDoor2(string &in asItem, string &in asEntity) { SetLevelDoorLocked("Lockeddoor_2", false); PlaySoundAtEntity("", "unlock_door", "Lockeddoor_2", 0, false); RemoveItem("Cell Door Key"); } _____________________________________ P.S, Clean up a bit _______________________________ Ok, i think i have it this time. RE: Level Doors Dosnt work when locked... - rallelol - 01-13-2012 It's "SetLevelDoorLocked" And not SetSwingDoorLocked! RE: Level Doors Dosnt work when locked... - Tripication - 01-14-2012 (01-13-2012, 01:17 PM)rallelol Wrote: It's "SetLevelDoorLocked" And not SetSwingDoorLocked!I think he fixed it, and didn't bother to reply. or ask just before he went on holiday so hes probably gonna be afk for ages...one of the two i reckon |