The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Thread Rating:
  • 3 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to 'Wake Up' (For intros, etc)
DamnNoHtml Offline
Senior Member

Posts: 469
Threads: 34
Joined: Sep 2010
Reputation: 16
#1
How to 'Wake Up' (For intros, etc)

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]

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);
}

Creator of Wake, Through the Portal, Insomnia, and Cycles What to do with HPL3....
09-20-2010, 11:26 PM
Find


Messages In This Thread
How to 'Wake Up' (For intros, etc) - by DamnNoHtml - 09-20-2010, 11:26 PM
RE: How to 'Wake Up' (For intros, etc) - by jens - 09-21-2010, 06:10 AM
RE: How to 'Wake Up' (For intros, etc) - by house - 11-16-2010, 11:34 PM
RE: How to 'Wake Up' (For intros, etc) - by house - 11-19-2010, 07:18 PM
RE: How to 'Wake Up' (For intros, etc) - by Ongka - 02-26-2011, 10:15 AM



Users browsing this thread: 1 Guest(s)