Frictional Games Forum (read-only)
"Low sanity" effect - make the collapse time longer - 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: "Low sanity" effect - make the collapse time longer (/thread-16874.html)



"Low sanity" effect - make the collapse time longer - ooadrianoo - 07-10-2012

In my opinion the effect if you sanity is very low is very cool and the effect of collapse.



Does anyone know the scripts of them? Angel



I want to insert it into my .hps file without sanitydamage and setplayersanity.I tried to
Code:
SetPlayerSanity(x);
but it doesn´t work, my sanity doesn´t change.



So I want to make this effect manually.


RE: Effect if the sanity is to low - SilentStriker - 07-10-2012

GiveSanityDamage(float afAmount, bool abUseEffect);

that should work if you give him around 90 sanity damage which makes him have only 10 sanity left. Smile


RE: Effect if the sanity is to low - ooadrianoo - 07-10-2012

thanks Smile yesterday it didn´t work -.-
But i still need the script, because I want to make the collapse time longer.


RE: "Low sanity" effect - make the collapse time longer - Your Computer - 07-10-2012

The player collapses when he loses all of his sanity. However, if you want the collapse to last longer, you'll need a full conversion.


RE: "Low sanity" effect - make the collapse time longer - ooadrianoo - 07-10-2012

hmm.... yes you´re right.

Where can I find the sound if the player colapse?


RE: "Low sanity" effect - make the collapse time longer - Damascus - 07-10-2012

Or you can always just fake it. I've done that several times, but it's complicated scripting using carefully spaced timers and combinations of these scripts:

PlayGuiSound(string& asSoundFile, float afVolume); //plays sounds like the player gasping or collapsing ("player_bodyfall.snt" is the sound I believe you want for collapsing)

FadeImageTrailTo(float afAmount, float afSpeed); //blurs the screen

MovePlayerHeadPos(float afX, float afY, float afZ, float
afSpeed, float afSlowDownDist); //raises or lowers view of the camera

FadePlayerRollTo(float afX, float afSpeedMul, float
afMaxSpeed); //rotates camera

SetPlayerMoveSpeedMul(float afMul); //slows down or speeds up player's movement

FadeOut(float afTime); //blacks out screen

There's a lot more you can use to create the desired effect, you just have to play around with them.