Drain sanity while looking at something? - 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: Drain sanity while looking at something? (/thread-10418.html) |
Drain sanity while looking at something? - SonOfLiberty796 - 09-21-2011 Yet another question I have. Can someone help me and explain how to drain the players sanity when he is looking at something? Like, if he looks at a dead body part (torso or whatever else) he starts to drain sanity, but when he looks away, the draining stops. Please help and thanks. RE: Drain sanity while looking at something? - Your Computer - 09-21-2011 I haven't used them yet, but you might want to try insanity areas. RE: Drain sanity while looking at something? - SonOfLiberty796 - 09-21-2011 (09-21-2011, 02:56 AM)Your Computer Wrote: I haven't used them yet, but you might want to try insanity areas.Insanity areas? I suppose those script functions are on the wiki correct? But how do I use them? RE: Drain sanity while looking at something? - Rapture - 09-21-2011 I think the insanity areas are only triggered when your Insanity is low (25 or less I think). Thats how I've seem them work so far, you get a random sound played back at you. I've tried placing multiple ones close to eachother (5 seconds apart) but the 2nd or 3rd one won't trigger. RE: Drain sanity while looking at something? - SonOfLiberty796 - 09-21-2011 (09-21-2011, 03:07 AM)Rapture Wrote: I think the insanity areas are only triggered when your Insanity is low (25 or less I think). Thats how I've seem them work so far, you get a random sound played back at you.Ohhh...Well isnt there another way to do what I mentioned without insanity areas? RE: Drain sanity while looking at something? - Your Computer - 09-21-2011 (09-21-2011, 03:08 AM)Xvideogamer720X Wrote: Ohhh...Well isnt there another way to do what I mentioned without insanity areas? Possibly: Code: void LowerSanity(string &in entity, int state) Code: SetEntityPlayerLookAtCallback("script_area_name", "LowerSanity", false); RE: Drain sanity while looking at something? - MrBigzy - 09-21-2011 Insanity areas just make a random insanity event happen, from a predefined list. You can look at and choose an event while in the debug menu too. Things like flies on the screen, screen going red, Daniel talking to himself, that sort of thing. RE: Drain sanity while looking at something? - Homicide13 - 09-21-2011 So first what you're going to do is make a script area to cover the object that drains the person's insanity. Then you use the SetEntityPlayerLookAtCallback(string& asName, string& asCallback, bool abRemoveWhenLookedAt); function to check if the player is looking at it. Make sure abRemoveWhenLookedAt is false, and have it call a function that starts a timer function that drains the player's sanity when alState is 1 and removes the timer when alState is -1. You can add in sound effects and screen distortion effects etc too if you would like. make sense? RE: Drain sanity while looking at something? - SonOfLiberty796 - 09-23-2011 Alright Ill try some of these methods out. Thanks guys |