Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Insanity Areas
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#1
Insanity Areas

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.
01-29-2011, 05:03 PM
Find
rmdashrf Offline
Junior Member

Posts: 7
Threads: 3
Joined: Jan 2011
Reputation: 0
#2
RE: Insanity Areas

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.

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);
    }
}
01-29-2011, 07:53 PM
Find
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#3
RE: Insanity Areas

Well, not really. PlayGuiSound / PlaySoundAtEntity would be what Viperdream is looking for, the chase sequence is something of a different kind.


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
01-29-2011, 08:11 PM
Find
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#4
RE: Insanity Areas

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?
(This post was last modified: 01-29-2011, 08:36 PM by Viperdream.)
01-29-2011, 08:33 PM
Find




Users browsing this thread: 1 Guest(s)