Subversion-Projekte sthq.gbs

Revision

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

//--------------------------------------------------------------------------------------
//
//  EF2 Level Script File
//
//  Level:              Map5
//  Script By:  Nemo22, Cortex, LTiefland, TickNSwisted
//  Geometry By:        Nemo22, TickNSwisted, Argyle
//  Created on: 07.02.2004
//
// Last Edited on:  $Date: 2007-05-27 23:26:00 +0200 (So, 27 Mai 2007) $
// Last Edited by:      $Author: lars $
//
//--------------------------------------------------------------------------------------

#include "maps/global_scripts/global_common.scr"
#include "maps/global_scripts/global_math.scr"
#include "maps/global_scripts/global_acceleratedMovement.scr"
#include "maps/global_scripts/global_cinematicFX.scr"
#include "maps/global_scripts/global_archetype.scr"
#include "maps/attackplayer.scr"

void main();
void initArchetypes();
void init();
void first_shot();
void finish_introcin();
void bay_sec_beamin();
void sec_shoot();
void shuttle_open();
void finish_awaycin();
void shuttle_away();
void shuttle_inside_sparks();
void sparks();
void redalert();
void closed_door_sound();

void shuttlesparks();
void bill_ex();

void main()
{
        initArchetypes();
        cam_fadeout( .1, 0, 0, 0, 1, 0 );
        $player.notsolid();
        $player.hide();
        letterbox( .1 );
        allowMusicDucking( 0 );
        freezeplayer();
        cinematic();
        
        $world.canShakeCamera( 1 );
        
        init();
        
        thread first_shot();
        soundtrack( "music/m8l2a.mus");
}


void initArchetypes()
{

      thread globalArchetype_Setup( $console_hint1, "mdoor");
      thread globalArchetype_Setup( $console_hint2, "sdoor");

}

void init()
{

        //$shuttle_stay.solid();
        $ramp_blocker.notsolid();

        $npcs_off.notsolid();
        $npcs_off.hide();
        $npcs_off.ai_off();

        $world.light_fade( "light_red", 0, 1 );
        
        $player.give( "models/weapons/worldmodel-tricorder-STX.tik" );
        
        $atlantic_out_origin.loopsound( "sound/ships/enterprise/ent_exterior_01.wav", 1 ,1024 );

//--Das Shuttle, das wegfliegt:
        $shuttle_fly_away_door.bind( $shuttle_origin );
        $shuttle_fly_away_ext.bind( $shuttle_origin );
        $shuttle_fly_away_door.hide();
        $shuttle_fly_away_ext.hide();
        
//--Kameras laden und spawnen
/*      cam.load( "map5_p_illia1" );
        cam.load( "map5_shuttle_cam1" );
        cam.load( "map5_shuttle_cam1d" );
        cam.load( "map5_shuttle_cam2" );
        cam.load( "map5_shuttle_cam3" );
        cam.load( "map5_shuttle_cam4" );
        cam.load( "map5_shuttle_path" );
        cam.load( "map5_cam_shuttle" );
        cam.load( "map5_jim_beamin" );
        cam.load( "map5_atlantic_last_shot" );*/

        spawn( "Camera", "targetname", "cam1");
        spawn( "Camera", "targetname", "cam2");
        spawn( "Camera", "targetname", "cam3");

//--Illia SetUp
//      $illia_shuttle.pushable( 1 );
        globalCommon_AiActorUseWeapon( $illia_shuttle, "none" );
        $illia_shuttle.ai_off();
        $illia_shuttle.pushable( 0 );
        $illia_shuttle.hide();
        $illia_shuttle.notsolid();
        
        globalCommon_AiActorUseWeapon( $ceilling_illia, "none" );
        $ceilling_illia.ai_off();
        $ceilling_illia.pushable( 0 );
        $ceilling_illia.hide();
        $ceilling_illia.notsolid();
        
        globalCommon_AiActorUseWeapon( $illia_shuttle_inside, "none" );
        $illia_shuttle_inside.ai_off();
        $illia_shuttle_inside.anim( "ent-frontchair-gesture1" );
        $illia_shuttle_inside.pushable( 0 );
        
//--Illia_prisoner SetUp
        $illia_prisoner.pushable( 0 );
        $illia_prisoner.notsolid();
        $illia_prisoner.ai_off();
        globalCommon_AiActorUseWeapon( $illia_prisoner, "none" );
        globalCommon_AiDummy( $illia_prisoner, "" );
        $illia_prisoner.anim("cin-m8_situp");
        
//--people in Engineering
        $jones0.ai_off();
        globalCommon_AiActorUseWeapon( $jones0, "none" );
        $shaun0.ai_off();
        globalCommon_AiActorUseWeapon( $shaun0, "none" );
        $bails0.ai_off();
        $bails0.pushable( 0 );
        globalCommon_AiActorUseWeapon( $bails0, "none" );
        
        $jones0.anim( "ent-curvedconsole-gesture" );
        $shaun0.anim( "ent-compstation-idle" );
        $bails0.anim( "ent-compstation-gesture1" );
        
//--Moya
        $moya.ai_off();
        
//--Security team setup
        $sec_1.ai_off();
        $sec_1.pushable( 0 );
/*      $sec_1.notsolid();
        $sec_1.hide();*/
        $sec_1.setgroupid ( 668 );

        //$sec_1.giveactorweapon( "actorweapons/fed-compressionrifle.tik", 1.0 );
        //$sec_1.useactorweapon( "CompressionRifle" );
//      $sec_1.anim( "idle_weapon_legs" );
        $sec_1.anim( "compressionrifle_aim" );
        
        $sec_2.ai_off();
        $sec_2.pushable( 0 );
/*      $sec_2.notsolid();
        $sec_2.hide();*/
        //$sec_2.giveactorweapon( "actorweapons/fed-compressionrifle.tik", 1.0 );
        //$sec_2.useactorweapon( "CompressionRifle" );
        $sec_2.setgroupid ( 668 );
        
        $sec_3.ai_off();
        $sec_3.pushable( 0 );
/*      $sec_3.notsolid();
        $sec_3.hide();*/
        //$sec_3.giveactorweapon( "actorweapons/fed-compressionrifle.tik", 1.0 );
        //$sec_3.useactorweapon( "CompressionRifle" );
        $sec_3.anim( "crouch_idle" );
        $sec_3.setgroupid ( 668 );

        AIHideGroup(668);
        
//--misc
        $illia_shuttle.blink( 0 );
        
        $kraftfeld.hide();
        
        $security.nottriggerable();
        $trigger_open.nottriggerable();
        $away_trigger.nottriggerable();
        
        globalCommon_SpawnScriptModel( "vehicle/e-shuttle-ext.tik", "dallas_shuttle1", '-2200 596 60', 0 );
        $dallas_shuttle1.scale( .01 );
        
        globalCommon_SpawnScriptModel( "vehicle/e-shuttle-door.tik", "dallas_shuttle2", '-2200 596 60', 0 );
        $dallas_shuttle2.scale( .01 );
        
        $dallas_shuttle1.bind( $dallas_origin );
        $dallas_shuttle2.bind( $dallas_origin );
        
        $atlantic_a.bind( $atlantic_out_origin );
        $atlantic_b.bind( $atlantic_out_origin );
        
        $shuttle_warp.hide();
        
        wait( .1 );
        $sec_2.anim( "idle_weapon_legs" );
        
//--Maschinenraumtür
        $engdoor3.time( .1 );
        wait( .1 );
        $engdoor3.moveUp( 170 );
        
        $movewall.bind( $bay_move_origin );
}

///////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////Intro/////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////


void first_shot()
{
//--Camera fades in, Illia beams in, walks to console
        skipthread ( "finish_introcin" );
        $cam1.fov( 60 );
        $cam1.follow( $map5_shuttle_cam1d );
        $cam1.cut();
        wait( .1 );
        cuecamera( $cam1 );
        wait( .5 );
        cam_fadein( 3, 0, 0, 0, 1, 0 );
        
        wait( 1 );
        $illia_shuttle.show();
        $illia_shuttle.displayEffect( "TransportIn", "FederationNoAnim" );
        wait( 3 );
        $illia_shuttle.blink( 1 );
        wait( 1 );
        $illia_shuttle.headWatchTarget( "illia_look_first", 7 );
        wait( 1 );
        $illia_shuttle.headWatchTarget( "illia_look_second", 7 );
        $cam2.fov( 60 );
        $cam2.follow( $map5_shuttle_cam1 );
        $cam2.cut();
        wait( .1 );
        cuecamera( $cam2 );
        
        wait( 2 );
        $illia_shuttle.walkto( "$walk1", "walk" );
        wait( .5 );
        $illia_shuttle.headWatchTarget( "none", 7 );
        waitfor( $illia_shuttle );
        $illia_shuttle.walkto( "$walk2", "walk" );
        waitfor( $illia_shuttle );
        $illia_shuttle.turntoangle( 225 );
        waitfor( $illia_shuttle );
        $illia_shuttle.anim( "ent-curvedconsole-gesture" );
        wait( 2 );
        $illia_shuttle.anim( "idle" );
        wait( 1 );
        $illia_shuttle.playdialog("localization/sound/dialog/map05/illia/damn.mp3", 1, 10000, 0);
        waitfordialog( $illia_shuttle );
        cam_fadeout( 1.5, 0, 0, 0, 1, 0 );
        wait( 2 );
        
//--Camera cuts to imprisoned Illia
        $cam3.fov( 60 );
        $cam3.follow( $map5_p_illia1 );
        $cam3.cut();
        wait( .1 );
        cuecamera( $cam3 );
        cam_fadein( 1.5, 0, 0, 0, 1, 0 );
        
        wait( 2 );
        $illia_prisoner.playdialog("localization/sound/dialog/map05/illia/ihadto.mp3", 1, 10000, 0);
        waitfordialog( $illia_prisoner );
        wait( .5 );
        $illia_prisoner.playdialog("localization/sound/dialog/map05/illia/maincontrol.mp3", 1, 10000, 0);
        waitfordialog( $illia_prisoner );
//      wait( 1 );
        cam_fadeout( 1.5, 0, 0, 0, 1, 0 );
        wait( 2 );
        cam_fadein( 1.5, 0, 0, 0, 1, 0 );
        
//--camera is in shuttle, Illia exits
        $cam2.fov( 60 );
        $cam2.follow( $map5_shuttle_cam2 );
        $cam2.cut();
        wait( .1 );
        cuecamera( $cam2 );

        $illia_shuttle.walkto( "$walk1", "walk" );
        waitfor( $illia_shuttle );
        $illia_shuttle.walkto( "$w1", "walk" );
        wait( 1 );
        ///////////////////
        //1. Tür geht auf//
        ///////////////////
        $shuttle_stay_door1.anim( "opening" );
        $shuttle_stay_door1.playsound( "sound/doors/enterprise_door1.wav", 1 ,800 );
        waitforanimation( $shuttle_stay_door1, "opening" );
        $shuttle_stay_door1.anim( "open_idle" );
                
//      $shuttle_stay_door1.time( 1 );
//      $shuttle_stay_door1.moveWest( 38 );
//      $shuttle_stay_door1.moveNorth( 38 );
        
        waitfor( $illia_shuttle );
        $illia_shuttle.walkto( "$w2", "walk" );
        waitfor( $illia_shuttle );
        $illia_shuttle.walkto( "$w3", "walk" );
        //////////////////
        //1. Tür geht zu//
        //////////////////
        //$shuttle_stay_door1.anim( "closing" );
        //$shuttle_stay_door1.playsound( "sound/doors/enterprise_door1.wav", 1 ,800 );
        //waitforanimation( $shuttle_stay_door1, "closing" );
        //$shuttle_stay_door1.anim( "closed" );

//      $shuttle_stay_door1.time( 1 );
//      $shuttle_stay_door1.moveEast( 38 );
//      $shuttle_stay_door1.moveSouth( 38 );
        waitfor( $illia_shuttle );
        ///////////////////
        //2. door opens //
        ///////////////////
        $shuttle_stay_door2.anim( "opening" );
        $shuttle_stay_door2.playsound( "sound/doors/enterprise_door1.wav", 1 ,800 );    waitforanimation( $shuttle_stay_door2, "opening" );
        $shuttle_stay_door2.anim( "open_idle" );

//      $shuttle_stay_door2.time( 1 );
//      $shuttle_stay_door2.moveWest( 44 );
//      $shuttle_stay_door2.moveNorth( 44 );

        $illia_shuttle.walkto( "$w4", "walk" );
        
        $cam3.fov( 60 );
        $cam3.follow( $map5_shuttle_cam4 );
        $cam3.cut();
        wait( .1 );
        cuecamera( $cam3 );
        
        waitfor( $illia_shuttle );
        //////////////////
        //2. Tür geht zu//
        //////////////////
        //$shuttle_stay_door2.anim( "closing" );
        //$shuttle_stay_door2.playsound( "sound/doors/enterprise_door1.wav", 1 ,800 );
        //waitforanimation( $shuttle_stay_door2, "closing" );
        //$shuttle_stay_door2.anim( "closed" );
        
//      $shuttle_stay_door2.time( 1 );
//      $shuttle_stay_door2.moveEast( 44 );
//      $shuttle_stay_door2.moveSouth( 44 );
        
        $illia_shuttle.walkto( "$w5", "walk" );
        waitfor( $illia_shuttle );

        thread finish_introcin();

}


void finish_introcin()
{

        $ramp_blocker.solid();
        $illia_shuttle.warpto( "$w5" );
        killthread("first_shot");
        $illia_shuttle.hide();  
//--Cinematic beenden
        clearletterbox( 0.1 );
        noncinematic();
        $player.solid();
        $player.show();
        releaseplayer();
        cueplayer();
        //sec_shoot();

}
////////////////////////////////////////////////////////////////////////////
///////////After the player has maniplulated the main console///////////////
/////player has to jump of the railing /////////////////////////////////////
////////////////////////////////////////////////////////////////////////////

void bay_sec_beamin()
{
        skipthread ( "finish_beamincin" );
        $player.notsolid();
        $player.hide();
        letterbox( .1 );
        freezeplayer();
        cinematic();
        $ceilling_illia.turntoangle( 180 );
        
        $ceilling_illia.show();
        $cam1.fov( 60 );
        $cam1.follow( $map5_shuttle_door_close );
        $cam1.cut();
        wait( .1 );
        cuecamera( $cam1 );
        
        wait( 1 );
        //--Shuttle sschließt die Türen
        $ramp_blocker.solid();
        $shuttle_stay_door.anim( "closing" );
        waitforanimation( $shuttle_stay_door, "closing" );
        $shuttle_stay_door.anim( "closed" );
        wait( 1 );
        $kraftfeld.show();
        $kraftfeld.playsound( "sound/ships/borg/borg_forcefield_on.wav", 1, 1, 11111 );
        $kraftfeld.loopsound( "sound/ships/enterprise/ent_forcefield.wav", .7, 30 );
        triggerentity( $kraftfeld_sound );
        wait( .4 );

        $rechte_door.time( 5.2 );
        wait( .1 );
        $rechte_door.moveUp( 300 );
        $rechte_door.loopsound( "sound/doors/airlock_open01.wav", 1 ,1024 );
        
        wait( 5.2 );
        $rechte_door.stoploopsound();
        $rechte_door.playsound( "sound/doors/airlock_close01.wav", 10 ,1 ,1024 );

        wait( 3.8 );
                
/*      $sec_1.solid();
        $sec_2.solid();
        $sec_3.solid();
        wait(1);*/

        
        $cam2.fov( 60 );
        $cam2.follow( $map5_jim_beamin );
        $cam2.cut();
        wait( .1 );
        cuecamera( $cam2 );
                
        $ceilling_illia.playdialog("localization/sound/dialog/map05/illia/goodbye.mp3", 1, 10000, 0);
        waitfordialog( $ceilling_illia );
        
        wait( 2 );
/*      $sec_1.displayEffect( "TransportIn", "FederationNoAnim" );
        $sec_2.displayEffect( "TransportIn", "FederationNoAnim" );
        $sec_3.displayEffect( "TransportIn", "FederationNoAnim" );
        wait( 2 );*/

        AIShowGroup (668, "Federation");
        $sec_1.headWatchTarget("player",7);
        $sec_2.headWatchTarget("player",7);
        $sec_3.headWatchTarget("player",7);
        $sec_1.ai_off();
        $sec_2.ai_off();
        $sec_3.ai_off();
        $sec_1.anim( "compressionrifle_aim" );
        $sec_2.anim( "compressionrifle_aim" );
        $sec_3.anim( "compressionrifle_aim" );
        
        $sec_2.playdialog( "localization/sound/dialog/map05/lee/donotmove.mp3", 1, 10000, 0);
        waitfordialog( $sec_2 );
        $ceilling_illia.turntoangle( 270 );
        wait( .5 );
        $sec_2.playdialog( "localization/sound/dialog/map05/lee/gameover.mp3", 1, 10000, 0);
        waitfordialog( $sec_2 );
        wait( 1 );
        $ceilling_illia.hide();
        
        //--End cinematic
        forcemusic( "action" );
        clearletterbox( 0.1 );
        noncinematic();
        $player.solid();
        $player.show();
        releaseplayer();
        cueplayer();
        $player.playerviewangles( '0 270 0' );
        
//      $security_beam.nottriggerable();
        $security.triggerable();
}

void sec_shoot()
{
//      centerprint("Sicherheit fängt an zu schießen!");
        
        $sec_1.turntoangle( 180 );
        $sec_2.walkto( "$secnode1", "run" );
        $sec_3.walkto( "$secnode2", "run" );
        waitfor( $sec_3 );
        $sec_1.anim( "idle_weapon_legs" );
        $sec_2.turntoangle( 180 );
        $sec_3.walkto( "$secnode3", "run" );
        waitfor( $sec_3 );
        $sec_3.turntoangle( 180 );
        waitfor( $sec_3 );
        $sec_3.anim( "idle_weapon_legs" );
        wait( .7 );
        $sec_2.anim( "idle_weapon_legs" );
/*      $sec_1.attackplayer();
        $sec_2.attackplayer();
        $sec_3.attackplayer();*/
        
//      AIShowGroup(668, "Federation");

        CommandToGroup ( 668 , "groupactortype" , "enemy" , "");
        CommandToGroup ( 668 , "visiondistance" , "40000" , "" );
        CommandToGroup ( 668 , "fov" , "360" , "" );
        CommandToGroup ( 668 , "attack" , "$player" , "" );

        $sec_1.ai_on();
        $sec_2.ai_on();
        $sec_3.ai_on();

        $trigger_open.triggerable();
        $security.nottriggerable();

}

void shuttle_open()
{
        $ramp_blocker.notsolid();
        $shuttle_stay_door.anim( "opening" );
        waitforanimation( $shuttle_stay_door, "opening" );
        $shuttle_stay_door.anim( "open_idle" );
        
        $away_trigger.triggerable();
        $trigger_open.nottriggerable();
}

void shuttle_away()
{
//--Begin cinematic!
        skipthread ( "finish_awaycin" );
        $player.notsolid();
        $player.hide();
        letterbox( .1 );
        freezeplayer();
        cinematic();
        
        $illia_shuttle.show();
        $cam1.fov( 60 );
        $cam1.follow( $away_cam1, $illia_shuttle );
        $cam1.cut();
        wait( .1 );
        cuecamera( $cam1 );
        
        $illia_shuttle.walkto( "$w4", "run" );
        waitfor( $illia_shuttle );
        
        $shuttle_stay_door.anim( "closing" );
        waitforanimation( $shuttle_stay_door, "closing" );
        $shuttle_stay_door.anim( "closed" );
        
        $illia_shuttle.hide();
        
        $shuttle_stay_door2.hide();
        $shuttle_stay_door1.hide();
        $shuttle_stay_door.hide();
        $shuttle_stay.hide();
        $shuttle_fly_away_door.show();
        $shuttle_fly_away_ext.show();
        
        $cam2.fov( 60 );
        $cam2.follow( $door_open_cam1 );
        $cam2.cut();
        wait( .1 );
        cuecamera( $cam2 );
        
        $shuttle_origin.followpath($shuttle_path);
        wait( 4.5 );
        $shuttle_origin.playsound( "sound/vehicles/shuttlecraft/shuttle_takeoff.wav", 0, 4 );
        wait( 16 );
        $rechte_door.time( 5.2 );
        $rechte_door.moveDown( 300 );
        $rechte_door.loopsound( "sound/doors/airlock_open01.wav", 1 ,1024 );
        wait( 2);
        
        wait( 4 );
        
        $cam2.fov( 20 );
        $cam2.follow( $map5_cam_shuttle );
        $cam2.cut();
        wait( .1 );
        cuecamera( $cam2 );
        $sky_ship.hide();
        
        wait( 1.2 );
        $rechte_door.stoploopsound();
        $rechte_door.playsound( "sound/doors/airlock_close01.wav", 10 ,.5 ,1024 );
        wait( .3 );
        $dallas_origin.followpath( $map5_shuttle_path );
        //wait( 6.5 );
        wait( 4 );
        
        $atlantic_out_origin.followpath( $atlantic_out_path );
        
        $cam3.fov( 55 );
        $cam3.follow( $atlantic_out_cam1, $atlantic_out_origin );
        $cam3.cut();
        wait( .1 );
        cuecamera( $cam3 );
        $kraftfeld.hide();
        
        wait( 8 );
        
        $cam1.fov( 55 );
        $cam1.follow( $atlantic_out_cam2, $atlantic_out_origin );
        $cam1.cut();
        wait( .1 );
        cuecamera( $cam1 );
        wait( 17 );
        /////////////////////////
        //Moya in engineering//
        /////////////////////////
        $cam3.fov( 75 );
        $cam3.follow( $engine_cam1 );
        $cam3.cut();
        wait( .1 );
        cuecamera( $cam3 );
        
        wait( 1 );
        thread sparks();
        wait(.1);
        $world.playsound( "sound/explo_large_01.wav",3,1,10000);
        triggerentity( $big_boom_engineering );
        wait(.1);

        $player.earthquake( 2.2, 1 );
        
        triggerentity( $eng_explosion );
        wait( 2 );
        thread redalert();
        $engdoor3.time( 6 );
        wait( .1 );
        $engdoor3.moveDown( 170 );
        wait( 1 );

        $moya.anim( "tap_comm" );//communicator
        waitforanimation( $moya, "tap_comm" );
        $moya.anim( "idle" );
        wait(1);
        $moya.playdialog( "localization/sound/dialog/map05/moya/bridge.mp3", 1, 10000, 0);
        waitfordialog( $moya );
        $moya.playdialog( "localization/sound/dialog/map05/moya/warpcore.mp3", 1, 10000, 0);
        waitfordialog( $moya );
        wait( .4 );
        $moya.playdialog( "localization/sound/dialog/map05/moya/deadinspace.mp3", 1, 10000, 0);
        waitfordialog( $moya );
        wait( 2 );
        triggerentity( $big_boom_engineering );
        thread bill_ex();
        wait( 2.5 );
        killthread( "sparks" );
        $cam2.fov( 90 );
        $cam2.follow( $map5_atlantic_last_shot );
        $cam2.cut();
        wait( .1 );
        cuecamera( $cam2 );
        wait( 2 );
        cam_fadeout( 10, 0, 0, 0, 1, 0 );
        wait( 4 );
//      stuffcmd( "showmenu continued\n" );
//      wait( 4 );
//      stuffcmd ( "popmenu 0\n" );
        
        wait( 4 );
        finish_awaycin();
}

void finish_awaycin()
{
//--end cinematic
        killthread("shuttle_away");
        clearletterbox( 0.1 );
        noncinematic();
        $player.solid();
        $player.show();
        releaseplayer();
        cueplayer();
        
        stuffcmd ("map map6");

        cam_fadein( 1.5, 0, 0, 0, 1, 0 );
}

//////////////////////////
//Explosions and sparks//
//////////////////////////
void shuttle_inside_sparks()
{
        $movewall.time( 15 );
        $sky_ship.time( 2.9 );
        wait( .1 );
        $movewall.moveEast( 1600 );
        $sky_ship.moveEast( 3 );
        $cam1.fov( 90 );
        $cam1.follow( $shuttle_inside_cam1 );
        $cam1.cut();
        wait( .1 );
        cuecamera( $cam1 );
        $player.earthquake( 1.2, 1 );
        triggerentity( $shuttle_inside_spark1 );
        triggerentity( $shuttle_inside_spark1_s );
        wait( .3 );
        triggerentity( $shuttle_inside_spark3 );
        triggerentity( $shuttle_inside_spark3_s );
        wait( .2 );
        triggerentity( $shuttle_inside_spark2 );
        triggerentity( $shuttle_inside_spark2_s );
        wait( .3 );
        triggerentity( $shuttle_inside_spark1 );
        triggerentity( $shuttle_inside_spark1_s );
        triggerentity( $shuttle_inside_spark3 );
        $sky_ship.time( .1 );
        wait( 2 );
        $sky_ship.moveWest( 3 );
        cuecamera( $cam2 );
        
}

void sparks()
{
        triggerentity( $sparks1 );
        $sparks1.playsound( "sound/impact/explosion/explo_shuttleint.wav" );
        wait( 1.1 );
        triggerentity( $sparks3 );
        $sparks3.playsound( "sound/impact/explosion/explo_shuttleint.wav" );
        wait( 2 );
        triggerentity( $sparks2 );
        $sparks2.playsound( "sound/impact/explosion/explo_shuttleint.wav" );
        wait( 1 );
        triggerentity( $sparks1 );
        $sparks1.playsound( "sound/impact/explosion/explo_shuttleint.wav" );
        triggerentity( $sparks3 );
        $sparks3.playsound( "sound/impact/explosion/explo_shuttleint.wav" );
        wait( 2 );
        thread sparks();
}

void redalert()
{
        $world.light_fade( "light_red", .65, .4 );
        triggerentity( $redalert_sound );
        wait( 1.5 );
        $world.light_fade( "light_red", .1, .8 );
        wait( 1 );
        thread redalert();
}

void shuttlesparks()
{
        $player.earthquake( .8, 2 );
        triggerentity( $shuttle_sparks );
        triggerentity( $fly_away_sparks_s );
        wait( .4 );
        triggerentity( $shuttle_sparks );
        triggerentity( $fly_away_sparks_s );
        wait( .4 );
        triggerentity( $shuttle_sparks );
        triggerentity( $fly_away_sparks_s );
        wait( .6 );
        triggerentity( $shuttle_sparks );
        triggerentity( $fly_away_sparks_s );
        wait( .1 );
        thread shuttle_inside_sparks(); 
}

void shuttle_goto_warp()
{
        $shuttle_warp.show();
        $shuttle_warp.followpath( $path_gowarp );
        wait( 2.6 );
        $shuttle_warp.playsound( "sound/ships/enterprise/ent_enter_warp.wav", 10 ,1 ,1024 );
        wait( 3.7 );

        $spawnWarpFlash.scale( .2 );
        $spawnWarpFlash.modelname( "models/fx/fx-warpflash-federation.tik" );
        $spawnWarpFlash.origin( $shuttle_warp.getOrigin() );
        wait( .05 );

        triggerEntity( $spawnWarpFlash );
        $shuttle_warp.hide();
}

void bill_ex()
{
        $bails0.turntoangle( 135 );
        wait( .1 );
        $bails0.anim( "cin-m6l0-engineering-bill" );
}

void closed_door_sound()
{
        $player.playsound( "sound/environment/computer/lcars_no.wav");
}