• Amnesia map entity script help!
    1 replies, posted
Hello facepunch! I've been mapping for Amnesia now the whole day and the one thing that I've been stuck on for a very long time is a script that I feel is rather simple but I cannot get it to work. [CODE]void OnStart() { FadeOut(0); FadeIn(20); SetupLoadScreen("LoadingScreens", "LoadingScreen_1", 0.0f, "sealed.jpg"); SetEntityActive("ambience01", true); SetMessage("ShowMessage", "ShowMessageText01", 4.70f); SetEntityCallbackFunc("latern1", "OnPickup"); } void OnPickup(string &in asItem, string &in asEntity) { SetSwingDoorClosed("door_1",true, false); PlaySoundAtEntity("latern1", "enabled03.ogg", "Player", 2, true); RemoveItem("latern1"); } [/CODE] This code won't seem to execute properly... There are no errors but neither the sound nor the door will do what it is supposed to do. [CODE]SetEntityCallbackFunc("latern1", "OnPickup");} void OnPickup(string &in asItem, string &in asEntity) { SetSwingDoorClosed("door_1",true, false); PlaySoundAtEntity("latern1", "enabled03.ogg", "Player", 2, true); RemoveItem("latern1"); }[/CODE] If you know any of this then please help! I don't know if this is the right section either. [URL]http://wiki.frictionalgames.com/hpl2/amnesia/script_functions#entities[/URL] Useful link!
You spelled lantern wrong.
Sorry, you need to Log In to post a reply to this thread.