How to make a "Scary 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: How to make a "Scary door?" (/thread-4425.html) |
How to make a "Scary door?" - sacroid - 09-16-2010 Hey there guys, I'm making now a serious story and I need to know how to make a "scary door". What I mean with Scary door, I mean: You interact with a locked door, and by touching it, the cammera will make a cammera effect and then a scary sound and a grunt behind makes noises, just like in wine Cellar (ofc, I would change it a bit). So, what's the script I need to write? with the time I'm starting a bit to understand scripting, but I still need help >_< I've been looking at the win cellar.hps file, and I read the part of the door, but it's so big, and strange (for me ) that for only making 1 interaction causes 3 things, I think is too much -_- Help is very appreciated! Thanks RE: How to make a "Scary door?" - MulleDK19 - 09-16-2010 In your OnStart() function you add Code: SetEntityPlayerInteractCallback("name_of_door_here", "FunctionToCall", true); Then make the callback function: Code: void FunctionToCall(string &in entity) Edit: For the camera effect, you could simply use void GiveSanityDamage(float afAmount, bool abUseEffect); Which will "bend" the camera little". Example: Code: void FunctionToCall(string &in entity) I've written a small function for you, that should give a more twisted camera effect: Code: void DoScaryCamera(float afSanityDamage) Simply add that to your script file, and simply do DoScaryCamera(15.0f) from anywhere in your code, to perform a little twisting camera effect. 15.0f being the sanity damage to apply. Haven't tested it as I just wrote it here, but it should work just fine. RE: How to make a "Scary door?" - sacroid - 09-16-2010 Thanks! I just needed it |