Frictional Games Forum (read-only)
Sanity Screen Effect? - 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: Sanity Screen Effect? (/thread-21248.html)



Sanity Screen Effect? - Dominic0904 - 04-22-2013

Is there a way to script in the screen effect that the player gets when their sanity is very low? Where the world sort of twists and rotates slightly, images stretch a bit. You know what I mean.

I want to have that screen effects but without the sanity damage being applied.


RE: Sanity Screen Effect? - Tomato Cat - 04-23-2013

You can try using the GetPlayerSanity() function in combination with the screen effect functions.


RE: Sanity Screen Effect? - Fatalist - 04-23-2013

Use FadeImageTrailTo(float afAmount, float afSpeed); and SetPlayerLookSpeedMul(float afMul);

for example:
FadeImageTrailTo(1.6, 1);
SetPlayerLookSpeedMul(0.6);

but it is only 2 effects. Dont know about third screen effect.


RE: Sanity Screen Effect? - Dominic0904 - 04-23-2013

Nar, already tried using those, they don't make the player's vision twist, turn and stretch. They are only static effects. Those are the ones that are used when you look at a Grunt or Brute.


RE: Sanity Screen Effect? - Tomato Cat - 04-23-2013

So what's the effect you're looking for?


RE: Sanity Screen Effect? - FlawlessHappiness - 04-23-2013

No, it's not possible via scripting. With a Full Conversion you are able to define at which sanity state it should happen. If you want it to happen in a quick event you can always SetPlayerSanity to 10 or something. That should trigger the effects. Afterwards put it up to 50 whatever you want.


RE: Sanity Screen Effect? - Dominic0904 - 04-23-2013

Hmm, what I could do then is set the players Sanity to whatever to get the effect, then disable Sanity drain using SetSanityDrainDisabled (so that the player wouldn't go completely insane if they see too make monsters and such during the period I need the effect for) and after I can give the sanity back to the player and re-enable the drain.

Sound like it could work?


RE: Sanity Screen Effect? - FlawlessHappiness - 04-23-2013

No.
SetSanityDrainDisabled does not work against monsters.
There needs to be a model between you and the monster, for the sanity to stop draining I think.
But hey, try it out! You need to test every variable in your story, to make it perfect


RE: Sanity Screen Effect? - Dominic0904 - 04-23-2013

"Enables/Disables sanity drain from darkness, monsters, etc."


That what it says on the Wiki :S Hope it will work, need to test it later!


RE: Sanity Screen Effect? - FlawlessHappiness - 04-23-2013

Search about it on the forum. It's been discussed much before