doors problem scirpts - 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: doors problem scirpts (/thread-12080.html) |
doors problem scirpts - jessehmusic - 12-25-2011 Hello i got a problem with my key and door script :S when i have it like this it wont let door be locked PHP Code: void OnStart() If i take that away the doors works to be locked what should i do.... NVM fixed RE: doors problem scirpts - palistov - 12-26-2011 Your script currently makes both doors unlocked when only one of the keys is used. A simple way you can avoid this is to use an if statement or two to check which door is being unlocked or which key is being used, then run the appropriate lines. If statements look like this: PHP Code: if(Condition) So check which key/door is being used by doing if(asItem == "Door key") { //etc etc} or if(asEntity == "mansion_1") { // blah blah } |