I want the player to react to a door that closes. - 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: I want the player to react to a door that closes. (/thread-7187.html) |
I want the player to react to a door that closes. - KHShox - 04-03-2011 I have been trying to get my player to react when a door closes. The door closes perfectly, and I have tried looking at many forums, videos, and the wiki. None of which really helped me. Here is the current code that I have. Yes, I also added a scream to the script. Quote://////////////////////////// RE: I want the player to react to a door that closes. - Russ Money - 04-03-2011 What do you mean by react? Stifled breath? The sanity damage effect? RE: I want the player to react to a door that closes. - KHShox - 04-03-2011 (04-03-2011, 09:33 PM)Russ Money Wrote: What do you mean by react? Stifled breath? The sanity damage effect? I mean by having sanity damage and stifled breath. RE: I want the player to react to a door that closes. - Russ Money - 04-03-2011 GiveSanityDamage(float afAmount, bool abUseEffect); Make sure the bool is true. And also, PlaySoundAtEntity("ScriptArea_2", "react_scare.snt", "ScriptArea_2", 0, false); If you wanted to play that so it seems like it's coming from the player, change it to PlaySoundAtEntity("ScriptArea_2", "react_scare.snt", "Player", 0, false); RE: I want the player to react to a door that closes. - KHShox - 04-03-2011 Ahh thanks man! This really helped a TON! |