Frictional Games Forum (read-only)

Full Version: Insanity Areas
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi.
I only learned to script things a few days ago. I'm making progress, but that doesn't mean that I can already do everything Tongue

So what I was wondering is, when the player enters an Insanity Area. How do I make him breath loud and do the screen vibration like in the game? I'm trying to make a case that the player finds out that the monster has escaped and gets quite a shock from it.

I've searched in the files of the original game, done a search on the forums and wiki. Yet I can't find any solution.

Thanks.
Code:
void  StartScreenShake(float afAmount, float afTime, float afFadeInTime,float afFadeOutTime);


// Insanity
void  SetInsanitySetEnabled(string& asSet, bool abX);
void  StartRandomInsanityEvent();
bool  InsanityEventIsActive();

// Effect
void  FadeIn(float afTime);
void  FadeOut(float afTime);
void  FadeImageTrailTo(float afAmount, float afSpeed);
void  FadeSepiaColorTo(float afAmount, float afSpeed);
void  FadeRadialBlurTo(float afSize, float afSpeed);
void  SetRadialBlurStartDist(float afStartDist);

For breathing, Amnesia uses timers.

A good map for reference is the Cellar Archives, take a look at that.

Code:
void TimerPlayerReact(string &in asTimer)
{
    if(asTimer == "scare"){
        PlayGuiSound("react_scare", 1.0f);
        SetRadialBlurStartDist(0.3f);
        FadeRadialBlurTo(0.1f, 0.05f);
        StartScreenShake(0.02f, 0.5f, 1.0f, 2.0f);
    }
    else if(asTimer == "breath"){
        PlayGuiSound("react_breath", 0.9f);
        FadeRadialBlurTo(0.0f, 0.02f);
    }
    else if(asTimer == "breathl"){
        PlayGuiSound("react_breath", 0.5f);
    }
}
Well, not really. PlayGuiSound / PlaySoundAtEntity would be what Viperdream is looking for, the chase sequence is something of a different kind.
Thanks for the replies, I'll try it out and see what happens Smile

EDIT: Do I apply these scripts the same way as a normal area script?