Frictional Games Forum (read-only)

Full Version: "Low sanity" effect - make the collapse time longer
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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
thanks Smile yesterday it didn´t work -.-
But i still need the script, because I want to make the collapse time longer.
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.
hmm.... yes you´re right.

Where can I find the sound if the player colapse?
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.