Frictional Games Forum (read-only)

Full Version: 2 issues
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, for "my" custom story, i want to make 2 changes one of which doesn't seem to work, and the other i have no idea how to add

1: Sanity regain color, i want it to be red but it doesn't work, i have tried this
SanityGain_Color = "red" i tried swapping red with color codes but it doesnt work


2: i need Sanity reaching 0 to do 20 damage, haven't found a clue on how to do that if it's even possible at all

help is appreciated
SanityGain_Color = "0.3 0.3 0.5 1"

This is the default. You should stick to the same format. In this case it's an RGBA format with values between 0 and 1. So pure red would be "1 0 0 1".

As for your second request, you'd probably need something like a looping timer which checks the player's current sanity and applies the damage if it's 0.

PHP Code:
void Timer(string &in asTimer)
{
    if(GetPlayerSanity() <= 0.0f)
    {
        GivePlayerDamage(20.0f);
        GivePlayerSanity(1.0f);
    }
    AddTimer("loop"1.0f"Timer");

Your mod isn't a Custom Story anymore. Take into consideration that changing SanityGain_Color makes your mod a Full Conversion, which is handled quite differently
I see, i'll have to scrap the red sanity regain then since i'm a novice at all this.

For the second thing, i get an error, not sure why, i tried to fix it but ended up with a different error so i'm not sure what to do, maybe i put the scripts in the wrong file? don't know these things too well
Can you post your script file?
I'll make it easy and just link the Custom Story

https://www.moddb.com/mods/amnesia-the-d...tical-mode