Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Insanity Areas
Author Message
Viperdream Offline
Member

Posts: 124
Joined: Jan 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
rmdashrf Offline
Junior Member

Posts: 7
Joined: Jan 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Frontcannon Offline
Senior Member

Posts: 538
Joined: Jul 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Viperdream Offline
Member

Posts: 124
Joined: Jan 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)