Subversion-Projekte sthq.gbs

Revision

Revision 880 | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

//--------------------------------------------------------------------------------------
//
//  A Gate Two Birds And The Beautiful Sky Level Script File
//      
//  Level:              map10
//  Script By:  DrBob & Others
//  Geometry By:        Others
//  Created on: 09/03/04
//
// Last Edited on:  $Date: 2007-10-03 14:57:12 +0200 (Mi, 03 Okt 2007) $
// Last Edited by:      $Author: lars $
//
//--------------------------------------------------------------------------------------

//The Cell Threads
void setupCellCin();
void setupBeachCin();
void doCellCin();

//The Credits Threads
void credits_cin();

//The Beach Threads
void initTrees();
void flyShuttle();
void tide();
void beach_cin();

//Other Threads
void skip_scene();

//Variables
//This is treated as a boolean variable
float beach_run = 0;
//This is also treates as a boolean value
float skipthread_run = 0;

void main()
{
        soundtrack( "/music/map10.mus");
        beach_run = 0;
        //Prepare for cin mode
        freezeplayer();
        cinematic();
        letterbox( 0.1 );

        setupBeachCin();

        //Do the cell cinematic
        setupCellCin();
        doCellCin();

        wait( 2 );

        //Credits
        credits_cin();

        wait( 2 );

        beach_run = 0;
        if( beach_run == 0 ) {
                //Beach cinematic
                initTrees();
                thread tide();
                beach_cin();

                beach_run = 1;
        }
}

void setupBeachCin()
{
        $stammheim2.ai_off();   
        $stammheim2.anim( "bar_sitting_left" );
        $stammheim2.notsolid();
        $stammheim2.removeactorweapon( "CompressionRifle" );
}

void skip_scene()
{
        if( beach_run == 0 ) {
                beach_run = 1;
                skipthread_run = 1;

                cam_fadeout( 2, 0, 0, 0, 1, 0 );
                wait( 1 );

                killthread( "credits_cin" );
                wait( 1 );

                //Hide the credits (menus)
                stuffcmd( "hidemenu credits-staff-gbs\n" );
                stuffcmd( "popmenu 0\n" );
                stuffcmd( "hidemenu credits-voice2-gbs\n" );
                stuffcmd( "popmenu 0\n" );
                stuffcmd( "hidemenu credits-voice1-gbs\n" );
                stuffcmd( "popmenu 0\n" );
                stuffcmd( "hidemenu credits-specialthanks-gbs\n" );
                stuffcmd( "popmenu 0\n" );

                beach_cin();
        }
}

void initTrees()
{
        float i;
        entity e;
        //Get all the trees and move them down
        for ( i = 1; i <= 18; i++ )
        {
                e = getentity ( "tree" + i );
                e.randomscale( 4.0, 5.5 );
                e.bind ( $tree_origin );
        }
        $tree_origin.speed( 500 );
        $tree_origin.moveDown( 100 );
}

void flyShuttle()
{
        //Make the shuttle fly around
        $shuttle.bind ( $shuttle_origin );
        $shuttle_origin.followpath( $shuttle_path, "normalangles" );
}

void tide()
{
        //This is a small thread to make the water ebb and flow
        $water.speed( 2 );
        while( 1 > 0 )
        {                       
                $water.moveDown( 20 );
                wait( 5 );
                $water.moveUp( 20 );    
                wait( 5 );
        }               
}

void beach_cin()
{

        //Setup the actors
        $stammheim2.ai_off();   
        $stammheim2.anim( "bar_sitting_left" );
        $stammheim2.notsolid();
        $beach_illia.ai_off();

        //Spawn the cameras
        spawn ( "Camera" , "targetname" , "cam1" );
        spawn ( "Camera" , "targetname" , "cam2" );
        spawn ( "Camera" , "targetname" , "cam3" );
        spawn ( "Camera" , "targetname" , "cam4" );
        spawn ( "Camera" , "targetname" , "cam5" );
        spawn ( "Camera" , "targetname" , "cam6" );
        spawn ( "Camera" , "targetname" , "cam7" );

        wait ( 0.5 );

        //Setup the cameras
        $cam1.follow( $beach_cam2 );
        $cam2.follow( $beach_cam3 );
        $cam3.follow( $beach_cam4 );
        $cam4.follow( $beach_cam_stevens );
        $cam5.follow( $beach_cam_stammheim2 );
        $cam7.follow( $beach_cam_illia );

        wait( 0.5 );

        //Start the ball rolling ;)
        $cam1.cut();
        wait( 1 );
        nointermission();
        cuecamera ( $cam1 );
        cam_fadein( 0.5, 0, 0, 0, 1, 0 );

        wait( 5 );

        //Show the 'Risa' text (menu)
        //Show the 'Three months later' text (menu)
        stuffcmd( "showmenu 3monthslater\n" );
        wait( 1 );
        stuffcmd( "popmenu 1\n" );
        wait( 0.1 );
        stuffcmd( "showmenu risa\n" );
        wait( 4 );
        stuffcmd( "popmenu 1\n" );
        wait( 0.1 );

        cuecamera ( $cam2 );
        wait( 2 );

        $beach_stammheim.ai_off();              
        $beach_stammheim.walkto( "$go_to_ship" );

        wait( 1 );

        cam_fadeout( 2, 0, 0, 0, 1, 0 );
        
        wait( 2.5 );

        cam_fadein( 1, 0, 0, 0, 1, 0 );

        //$stammheim2.show();
        //$stammheim2.solid();
        $stammheim2.anim( "bar_sitting_left" );

        cuecamera( $cam3 );

        $stevens.playdialog("localization/sound/dialog/map10/stevens/ihope.mp3",1,10000,0);
        waitfordialog($stevens);

        wait( 1 );
        cuecamera( $cam5 );


        $stammheim2.playdialog( "localization/sound/dialog/map10/stammheim/stayforever.mp3", 1, 10000, 0 );
        waitfordialog( $stammheim2 );

        wait( 1 );

        cuecamera( $cam4 );

        $stevens.playdialog("localization/sound/dialog/map10/stevens/donotbestupid.mp3",1,10000,0);
        waitfordialog($stevens);

        wait( 1 );

        $stevens.playdialog("localization/sound/dialog/map10/stevens/iknowyou.mp3",1,10000,0);
        waitfordialog($stevens);

        wait( 1 );

        $stevens.playdialog("localization/sound/dialog/map10/stevens/nextmission.mp3",1,10000,0);
        waitfordialog($stevens);

        wait( 1 );

        //cuecamera( $cam5 );

        wait( 1 );

        $stevens.playdialog("localization/sound/dialog/map10/stevens/meetingpoint.mp3",1,10000,0);
        waitfordialog($stevens);

        thread flyShuttle();

        $cam6.follow( $beach_cam5 );
        wait( 0.5 );

        cuecamera ( $cam6 );
        cam_fadein( 1, 0, 0, 0, 1, 0 );
        wait ( 5.95 );

        trigger( "$bigBang3" );
        trigger( "$exp_sound" );
        trigger( "$exp_sound0" );
        trigger( "$exp_sound1" );
        trigger( "$exp_sound2" );

        $shuttle.hide();
        wait( 7 );

        cuecamera ( $cam7 );

        wait( 2.8 );

        $beach_illia.playdialog( "localization/sound/dialog/map10/illia/beautifulsky.mp3", 2, 10000, 0 );
        waitfordialog( $beach_illia );

        wait( 5 );

        cam_fadeout( 2, 0, 0, 0, 1, 0 );

        wait( 1.5 );

        //Show 'The End' text (menu)
        stuffcmd( "showmenu endgbs\n" );
        wait( 5 );
        stuffcmd( "popmenu 1\n" );
        wait( 0.1 );

        wait( 1 );

        //Disconnect
        stuffcmd( "disconnect\n" );
//      stuffcmd( "map beta_ending\n" );
}

void setupCellCin()
{
        //Setup for the cell cinematic
        $guard1.ai_off();
        $guard2.ai_off();
        $guard3.ai_off();
        $guard4.ai_off();
        $illia_prisoner.ai_off();
        $illia_prisoner.morph( "exp_Nervous" );
        $illia_prisoner.removeactorweapon( "CompressionRifle" );
        $illia_prisoner.pushable( 0 );
        $illia_prisoner2.ai_off();
        $illia_prisoner2.anim( "idle" );
        $illia_prisoner2.removeactorweapon( "CompressionRifle" );
        $illia_prisoner2.hide();
        $illia_prisoner2.pushable( 0 );
        $illia_prisoner3.ai_off();
        $illia_prisoner3.removeactorweapon( "CompressionRifle" );
        $tebok.pushable( 0 );
        $tebok.ai_off();
        $tebok2.pushable( 0 );
        $tebok2.hide();
        $tebok2.ai_off();
        $stammheim2.ai_off();
        $stammheim.ai_off();
}

void doCellCin()
{
        //Spawn the cameras
        spawn ( "Camera" , "targetname" , "c_cam1" );
        spawn ( "Camera" , "targetname" , "c_cam2" );
        spawn ( "Camera" , "targetname" , "c_cam3" );
        spawn ( "Camera" , "targetname" , "c_cam6" );
        wait( 0.5 );

        //Setup the cameras
        $c_cam1.follow( $cell_cam1 );
        $c_cam2.follow( $cell_cam2 );
        wait( 1 );

        trigger( "$door" );

        //Lights! Camera! Action!
        cuecamera ( $c_cam1 );

        $guard1.walkto( "$mark3" , "walk" , 0 , -1 );
        wait( 0.5 );
        $illia_prisoner.walkto( "$mark1" , "walk" , 0 , -1 );
        wait( 1 );      
        $guard2.walkto( "$mark4" , "walk" , 0 , -1 );
        wait( 5 );

        $illia_prisoner.hide();
        $tebok.hide();
        $illia_prisoner2.show();
        $tebok2.show();

        cuecamera ( $c_cam2 );

        $tebok2.playdialog( "localization/sound/dialog/map10/Tebok/sitdown.mp3", 1, 10000, 0 );
        waitfordialog( $tebok2 );

        //Guards are too brightly lit, better if they are not seen from here on
        $guard1.hide();
        $guard2.hide();


        $illia_prisoner2.anim( "cin-m8_situp" );

        wait( 1 );

        $tebok2.playdialog( "localization/sound/dialog/map10/Tebok/starttelling.mp3", 1, 10000, 0 );
        waitfordialog( $tebok2 );

        $illia_prisoner2.playdialog( "localization/sound/dialog/map10/illia/withpleasure.mp3", 2, 10000, 0 );
        waitfordialog( $illia_prisoner2 );

        $illia_prisoner2.playdialog( "localization/sound/dialog/map10/illia/story.mp3", 2, 10000, 0 );
        waitfordialog( $illia_prisoner2 );

        $illia_prisoner2.playdialog( "localization/sound/dialog/map10/illia/everythingbegan.mp3", 2, 10000, 0 );

        wait( 1 );

        cam_fadeout( 2, 0, 0, 0, 1, 0 );

        wait( 3 );

        $c_cam3.follow( $cell_cam3 );

        wait( 0.1 );

        cam_fadein( 2, 0, 0, 0, 1, 0 );
        cuecamera ( $c_cam3 );

        $illia_prisoner2.playdialog( "localization/sound/dialog/map10/illia/thatishowigot.mp3", 2, 10000, 0 );
        waitfordialog( $illia_prisoner2 );

        wait( 2 );

        $tebok2.playdialog( "localization/sound/dialog/map10/Tebok/cooperation.mp3", 1, 10000, 0 );
        waitfordialog( $tebok2 );

        $tebok2.playdialog( "localization/sound/dialog/map10/Tebok/factremains.mp3", 1, 10000, 0 );
        waitfordialog( $tebok2 );

        $tebok2.playdialog( "localization/sound/dialog/map10/Tebok/executionis.mp3", 1, 10000, 0 );
        waitfordialog( $tebok2 );

        $tebok2.playdialog( "localization/sound/dialog/map10/Tebok/ifyourcooperation.mp3", 1, 10000, 0 );
        waitfordialog( $tebok2 );

        wait( 2 );

        $c_cam6.follow( $cell_cam6, $guard4 );

        $tebok2.playdialog( "localization/sound/dialog/map10/Tebok/followguard.mp3", 1, 10000, 0 );
        waitfordialog( $tebok2 );

        $tebok2.playdialog( "localization/sound/dialog/map10/Tebok/seeagain.mp3", 1, 10000, 0 );
        waitfordialog( $tebok2 );

        wait( 0.1 );

        cuecamera ( $c_cam6 );

        $guard4.walkto( "final_mark1A" , "walk" , 0 , -1 );
        wait( 0.5 );
        $illia_prisoner3.walkto( "final_mark1B" , "walk" , 0 , -1 );
        wait( 0.5 );
        $guard3.walkto( "final_markB" , "walk" , 0 , -1 );

        wait( 3 );
        cam_fadeout( 2, 0, 0, 0, 1, 0 );
}

void credits_cin()
{
        skipthread( "skip_scene" );
        wait( 1 );

        //Setup for the credits cinematic
        $illia_prisoner.hide();
        $illia_prisoner.notsolid();
        $illia_prisoner2.hide();
        $illia_prisoner2.notsolid();
        $tebok2.hide();
        $tebok2.notsolid();

        //Ready the camera
        spawn( "Camera" , "targetname" , "credits_camera" );
        wait( 0.5 );
        $credits_camera.follow( $credits_cam, $interrogation_chair );
        $credits_camera.cut();
        cuecamera( $credits_camera );
        cam_fadein( 2, 0, 0, 0, 1, 0 );
        
        //In here, we need to make the credit menus come up
        if( skipthread_run == 0 ) {
                stuffcmd( "showmenu credits-staff-gbs\n" );
                wait( 8 );
                stuffcmd( "popmenu 1\n" );
                wait( 1 );
        }

        if( skipthread_run == 0 ) {
                stuffcmd( "showmenu credits-voice1-gbs\n" );
                wait( 8 );
                stuffcmd( "popmenu 1\n" );
                wait( 1 );
        }

        if( skipthread_run == 0 ) {
                stuffcmd( "showmenu credits-voice2-gbs\n" );
                wait( 8 );
                stuffcmd( "popmenu 1\n" );
                wait( 1 );
        }

        if( skipthread_run == 0 ) {
                stuffcmd( "showmenu credits-specialthanks-gbs\n" );
                wait( 8 );
                stuffcmd( "popmenu 1\n" );
                wait( 1 );
        }

        cam_fadeout( 2, 0, 0, 0, 1, 0 );

        skipthread( "" );
        wait( 1 );
}