![]() |
Problem With Unlock Level 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: Problem With Unlock Level Door (/thread-11668.html) |
Problem With Unlock Level Door - narutohokager - 12-04-2011 Hi. I have a big problem which I can not find a solution ... So here is the script : Quote:void UnlockNextLevel(string &in asItem, string &in asEntity)The Key : http://img15.hostingpics.net/pics/131812481.png The Door : http://img15.hostingpics.net/pics/468589242.png What wrong ???? I really look everywhere... Help needed ![]() RE: Problem With Unlock Level Door - JenniferOrange - 12-04-2011 there is a different function for level doors. void OnStart() { AddUseItemCallback("", "SecondLevel", "NextLevel", "UnlockNextLevel", true); } void UnlockNextLevel(string &in asItem, string &in asEntity) { SetLevelDoorLocked("NextLevel", false); PlaySoundAtEntity("", "unlock_door", "NextLevel", 0, false); RemoveItem("SecondLevel"); } your script was also out of place for some reason. void OnStart() is always at the top. RE: Problem With Unlock Level Door - Your Computer - 12-05-2011 (12-04-2011, 09:07 PM)JenniferOrange Wrote: your script was also out of place for some reason. void OnStart() is always at the top. It doesn't have to be, since the compiler compiles the entire script to bytecode before making use of it. RE: Problem With Unlock Level Door - narutohokager - 12-05-2011 Thank you it work ![]() But when the door is locked, I put a SetEntityInteractCallback, is that after using the key you can remove it? |