Script help - 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: Script help (/thread-22142.html) |
Script help - OriginalUsername - 07-15-2013 Hey guys, So I've been working on a custom model which opens and closes through the script. (Objectstate 1 = closed) But it doesn't seem to work for me. It closes but it doesn't open up again. Could you take a look at it? Code: void OnStart() Oh, the interaction callback goes through the editor. RE: Script help - Your Computer - 07-15-2013 Have you tried using else if for the second if statement? That should prevent it from closing immediately after opening. RE: Script help - OriginalUsername - 07-15-2013 worked, thanks! |