Frictional Games Forum (read-only)

Full Version: How to 'Wake Up' (For intros, etc)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
This is a simple script used primarily for intros. This simulates the effects of being on the ground and slowly waking up. (As in the main game)

If you want this to happen as the game starts, simply put
wakeUp();
in the onStart() block of code.[/code]

Code:
void wakeUp () {
    FadeOut(0);     // Instantly fades the screen out. (Good for starting the game)
    FadeIn(20);      // Amount of seconds the fade in takes
    FadeImageTrailTo(2, 2);
    FadeSepiaColorTo(100, 4);
    SetPlayerActive(false);    
    FadePlayerRollTo(50, 220, 220);                 // "Tilts" the players head
    FadeRadialBlurTo(0.15, 2);
    SetPlayerCrouching(true);              // Simulates being on the ground
    AddTimer("trig1", 11.0f, "beginStory");            // Change '11.0f' to however long you want the 'unconciousness' to last
}

void beginStory(string &in asTimer){
    ChangePlayerStateToNormal();
    SetPlayerActive(true);
    FadePlayerRollTo(0, 33, 33);        // Change all settings to defaults
    FadeRadialBlurTo(0.0, 1);
    FadeSepiaColorTo(0, 4);
    SetPlayerCrouching(false);
    FadeImageTrailTo(0,1);
}
Wow and I was just about to ask how to do that! Thanks a bunch!

EDIT: So should I copy all of what you just posted in the code box?
Yeah, copy all the code in the box and then also add wakeUp(); to your onstart section.
This guys a pro!
I think there are some good sounds too that could be used for this..
thanks, good work. I make my own wake up but i will try yours Smile i think it could be better then my Wink
Is there a way to make the wakeup from the begining of the game Amnesia? That would change my life forever.
(11-19-2010, 07:18 PM)house Wrote: [ -> ]Is there a way to make the wakeup from the begining of the game Amnesia? That would change my life forever.

Yes - Lots and lots of scripting, and a bit of luck
I use this wakeup, but at the beginnign before you get up my screen shakes horribly and i cant look around. No idea why this is but its annoying and i have no idea how to fix it.
(11-21-2010, 01:27 PM)LoneWolf Wrote: [ -> ]I use this wakeup, but at the beginnign before you get up my screen shakes horribly and i cant look around. No idea why this is but its annoying and i have no idea how to fix it.

Is your spawn partially in any objects, or in the ground at all? It could also be too high. Try refining the spawn area a touch

Failing that, have you modified it at all?
Pages: 1 2 3