Subversion-Projekte sthq.gbs

Revision

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

//  EF2 Level Script File
//
//  Level:              map10.bsp
//  Script By:          DrBob & Argyle & Sam "Bicko" Bickley
//  Geometry By:        Argyle & TickNSwisted & DrBob & Sam "Bicko" Bickley
//  Created on:         02/04/04
//  Last Edited on:     05/07/04
//  Last Edited By:     TickNSwisted
//**************************************************************************
//      MAP 10 SCRIPT
//**************************************************************************
//INCLUDES
        #include "maps/global_scripts/global_common.scr"
        #include "maps/global_scripts/global_playerLoadout.scr"

        void fire_door_01();
        void open_door_01();
        void shut_door_01();
        void fire_lift_01();
        void fire_lift_02();
        void fire_lift_03();
        void fire_ff_01();
        void modulate_done();
        
        void main();
        void setupWorld();
        
        void cin_cells();
        void cin_cells_skip();

                float elevator1_pos = 1;
                float door_01_pos = 1;
                float lift_02_pos = 1;





void fire_door_01()
{
 if( door_01_pos == 0 )
  {
        close_door_01();
  }

 else
  {
   if( door_01_pos == 1 )
    {
        open_door_01();
        wait( 5 );
        close_door_01();
    }
  }

        thread globalCommon_OnUse( $door1_left, "fire_door_01" );
}


void open_door_01()
{
        door_01_pos = 1;

        $door1_init.movesouth( 102 );
        waitfor( $door1_init );

        $door1_right.movesouth( 116 );
        $door1_left.movenorth( 116 );
        
        waitFor( $door1_left );

        door_01_pos = 0;
}


void shut_door_01()
{
        door_01_pos = 0;

        $door1_left.movesouth( 116 );
        $door1_right.movenorth( 116 );

        wait ( $door1_right );
        $door1_init.movesouth( 102 );

        waitFor( $door1_init );

        door_01_pos = 1;
}


void fire_lift_01 ()
{
        $lift_01.playsound ( "sound/environment/machine/lift3.wav" );
        $lift_01.time ( 6 );
        $lift_01.movedown ( 432 );
        wait ( 6 );
        $lift_01.playsound ( "sound/environment/machine/lift3stop.wav" );

        wait ( 3 );
        $lift_01.playsound ( "sound/environment/machine/lift3.wav" );
        $lift_01.time ( 6 );
        $lift_01.moveup ( 432 );
        wait ( 6 );
        $lift_01.playsound ( "sound/environment/machine/lift3stop.wav" );
        wait ( 3 );
}

void fire_lift_02 ()
{
        if ( lift_02_pos == 0 )
        {
                $lift_02.playsound ( "sound/environment/machine/lift3.wav" );
                $lift_02.time ( 4 );
                $lift_02.movedown ( 280 );
                wait ( 4 );
                $lift_02.playsound ( "sound/environment/machine/lift3stop.wav" );
                wait ( 3 );
                lift_02_pos = 1;
        }
        else
        {
         if ( lift_02_pos == 1 )
        {
                $lift_02.playsound ( "sound/environment/machine/lift3.wav" );
                $lift_02.time ( 4 );
                $lift_02.moveup ( 280 );
                wait ( 4 );
                        $lift_02.playsound ( "sound/environment/machine/lift3stop.wav" );
                        wait ( 3 );
                        lift_02_pos = 0;
                }
        }
}


void fire_lift_03 ()
{
        $lift_03.playsound ( "sound/environment/machine/lift3.wav" );
        $lift_03.time ( 3 );
        $lift_03.moveup ( 262 );
        wait ( 3 );
        $lift_03.playsound ( "sound/environment/machine/lift3stop.wav" );

        wait ( 4 );
        $lift_03.playsound ( "sound/environment/machine/lift3.wav" );
        $lift_03.time ( 3 );
        $lift_03.movedown ( 262 );
        wait ( 3 );
        $lift_03.playsound ( "sound/environment/machine/lift3stop.wav" );
        wait ( 3 );
}

void fire_ff_01 ()
{
        $ff_01.remove ();
}





void modulate_done()
{
        centerprint("Modulation Complete!");
}

//**************************************************************************
//INHERENT FUNCTIONS
//**************************************************************************
void main()
{
        soundtrack( "music/m10l1-romulan_installation.mus" );

        $player.give( "models/weapons/worldmodel-phaser-STX.tik" );
        $player.give( "models/weapons/worldmodel-compressionrifle.tik" );
        $player.give( "models/weapons/worldmodel-rom-disruptor.tik" );
        
        $player.ammo( "Phaser", 200 );
        $player.ammo( "Disruptor", 200 );
        $player.ammo( "Fed", 200 );

        $player.armor( "BasicArmor", 100 );

        $player.use( "romulanDisruptor" );

        //-----------cut-out---------------------
        //$sky.rendereffects( "+skyorigin" );
        //$world.weather( "rain", 400 );
        //$world.entity_fade_dist( 3072 );
        //stuffcmd ( "r_light_emphasize 100\n" );
        //------------------------TickNSwisted---

        //Setup the world
        setupWorld();

        //Wait for the player
        waitForPlayer();

        //Show the mission objective
        $player.setobjectiveshow( "findstammheim", 1 );
}

void setupWorld()
{
        //Setup onUse threads...
        thread globalCommon_OnUse( $door1_lower, "fire_door_01" );

        //Change the player's model
        $player.model( "char/hazardteam_jurot.tik" );

        //Load the mission objectives
        $player.loadobjectives( "GBS10" );

        //Give the player her weapons
        globalLoadout_GiveWeapon( WEAPON_TRICORDER_STX );
        globalLoadout_GiveWeapon( WEAPON_ROMULAN_DISRUPTOR );
        $player.give( "models/weapons/worldmodel-rom-disruptor-rifle.tik" );

        //Make Stammheim so that he isn't allowed to be killed by you
        $stammheim.not_allowed_to_kill();

        //Remove Stammheim's toy
        $stammheim.removeactorweapon( "CompressionRifle" );

        //Spawn cameras
        spawn( "Camera", "targetname", "cam1" );

        //Remove NPCs AI
        $stammheim.ai_off();

        //Set NPCs sides
        $stammheim.actortype( "teammate" );
        $player.addrosterteammate1( $stammheim );

        //Make it so that Romulans wont attack Stammheim, only you
        $stammheim.flags( "+notarget" );

        //Make Stammheim a mission target
        $stammheim.missionobjective( 1 );

        //Setup NPC animations
        $stammheim.anim( "idle_breathing" );

        //Setup NPC facial animation
        $stammheim.morph( "exp_eyes_heavy" );
        $stammheim.morph( "exp_Nervous" );
        $stammheim.morph( "exp_Fear" );
        $stammheim.morph( "exp_Sad" );

        //Make NPCs non-pushable
}

//CINEMATIC FUNCTIONS
void cin_cells()
{
        skipthread( "cin_cells_skip" );

        cam_fadeout( 0.1, 0, 0, 0, 1, 0 );

        //Make Illia holster any weapon she might have acquired
        $player.holster();

        //Bring up a fake player model
        fakeplayer();

        //Make the fakeplayer use the same weapon as you
        //This does not work with Tricorder-TickNSwisted
        globalCommon_AiActorUseWeapon( $fakeplayer, "current" );

        //Initialize the fake player
        //$fakeplayer.strictlyfollowpath( 1 );

        $cam1.follow( $cin_cells_cam1_pos1, $fakeplayer );
        $cam1.cut();

        //Make it a cinematic
        cinematic();
        letterbox( 0.5 );

        wait( 0.5 );

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

        cuecamera( $cam1 );

        wait( 0.1 );

        //Make Illia walk up to the doors
        $fakeplayer.walkto( "$cin_cells_illia_pos_enter" );
        waitFor( $fakeplayer );

        //Open the door
        thread open_door1();

        //Make the camera pan down to look through the door
        $cam1.follow( $cin_cells_cam1_pos2 );

        //Make Illia hesitate slightly
        wait( 0.3 );

        //Make Illia walk to inside the cell room
        //$fakeplayer.walkto( "$cin_cells_illia_pos_inside", "run", 0, -1 );
        $fakeplayer.walkto( "$cin_cells_illia_pos_inside" );
        waitFor( $fakeplayer );
        $fakeplayer.headwatch( $stammheim );
        $fakeplayer.walkto( "$cin_cells_illia_pos_nearcell" );
        wait( 1 );

        //Close the door again, just to be tidy
        close_door1();

        //Fade the camera out
        cam_fadeout( 1, 0, 0, 0, 1, 0 );

        wait( 2 );

        //Setup the camera inside the cell room
        $cam1.follow( $cin_cells_cam1_pos3 );
        $cam1.cut();

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

        wait( 1 );

        //POSSIBLE ANIMATIONS FOR STAMMHEIM:
        //      cheer                           :                       Arms above head
        //      conv-embarrassment              :                       Head in hands
        //      conv-gesture1                   :                       Looking around, scared
        //      conv-laugh1                     :                       Pain
        //      conv-look                       :                       Looking around, scared
        //      conv-shakehead                  :                       Pain in head, voices            //      idle_breathing                  :                       Hard to breathe]

        //Illia: Stammheim.
        $fakeplayer.morph( "exp_Relief" );
        $fakeplayer.playdialog( "localization/sound/dialog/map10/Illia/stammheim.mp3", 1, 10000, 0 );
        waitForDialog( $fakeplayer );
        $fakeplayer.unmorph( "exp_Relief" );

        wait( 0.5 );

        //Turn Stammheim towards the player
        $stammheim.turntowardsplayer();
        $stammheim.headwatch( $fakeplayer );

        wait( 0.5 );

        //Stammheim: Who...who are you?
        $stammheim.playdialog( "localization/sound/dialog/map10/Stammheim/whoareyou.mp3", 2, 10000, 0 );
        waitForDialog( $stammheim );

        //Start the camera panning up on Illia
        $cam1.follow( $cin_cells_cam1_pos4 );
        $cam1.cut();

        //Illia: You know me Stammheim.
        $fakeplayer.anim( "conv-gesture1" );
        $fakeplayer.morph( "exp_Skeptical" );
        $fakeplayer.playdialog( "localization/sound/dialog/map10/Illia/youknowme.mp3", 1, 10000, 0 );
        waitForDialog( $fakeplayer );
        $fakeplayer.anim( "idle" );

        //Illia: The mission on Cardassia Prime?
        $fakeplayer.anim( "conv_shrug" );
        $fakeplayer.playdialog( "localization/sound/dialog/map10/Illia/cardassiaprime.mp3", 1, 10000, 0 );
        waitForDialog( $fakeplayer );
        $fakeplayer.anim( "idle" );

        wait( 0.5 );

        //Illia: Doesn't that ring a bell?
        $fakeplayer.unmorph( "exp_Skeptical" );
        $fakeplayer.morph( "exp_Confused" );
        $fakeplayer.playdialog( "localization/sound/dialog/map10/Illia/ringabell.mp3", 1, 10000, 0 );
        waitForDialog( $fakeplayer );

        wait( 0.5 );

        //Pointing at Stammheim through the forcefield
        $cam1.follow( $cin_cells_cam1_pos5 );
        $cam1.cut();

        //Stammheim: No more questions...please...please...
        $stammheim.anim( "conv-shakehead" );
        $stammheim.playdialog( "localization/sound/dialog/map10/Stammheim/nomorequestions.mp3", 2, 10000, 0 );
        waitForDialog( $stammheim );

        wait( 1.5 );

        //Stammheim: My head...
        $stammheim.anim( "cheer" );
        $stammheim.morph( "exp_Pain" );
        $stammheim.playdialog( "localization/sound/dialog/map10/Stammheim/myhead.mp3", 2, 10000, 0 );
        waitForAnimation( $stammheim, "cheer" );
        $stammheim.anim( "idle" );
        waitForDialog( $stammheim );

        //Stammheim: The Romulan said the pain would stop...but it hasn't.
        $stammheim.anim( "conv-shakehead" );
        $stammheim.playdialog( "localization/sound/dialog/map10/Stammheim/painstop.mp3", 2, 10000, 0 );
        waitForDialog( $stammheim );

        wait( 0.5 );

        //Looking at Illia
        $cam1.follow( $cin_cells_cam1_pos6, $fakeplayer );
        $cam1.cut();

        //Illia: The Romulans didn't exactly handle him with kid gloves, it seems.
        $fakeplayer.playdialog( "localization/sound/dialog/map10/Illia/romulans.mp3", 1, 10000, 0 );
        waitForDialog( $fakeplayer );
        $fakeplayer.unmorph( "exp_Confused" );
        $fakeplayer.morph( "exp_Serious" );

        wait( 0.5 );

        //Make Illia walk over to the console & deactivate the forcefield
        $fakeplayer.walkto( "$cin_cells_illia_pos_console" );
        waitFor( $fakeplayer );

        wait( 0.1 );

        //Make Illia use the console and play a sound
        //$fakeplayer.turntowardsentity( $console );
        $fakeplayer.headwatch( $console );
        $fakeplayer.turntoangle( 0 );
        waitFor( $fakeplayer );
        $fakeplayer.anim( "ent-transporter-rear-gesture" );
        $console.playsound( "sound/ships/romulan/rom_beep_yes.wav", 0, 1 );

        $cam1.lookat( $fakeplayer );

        waitForAnimation( $fakeplayer, "ent-transporter-rear-gesture" );
        $fakeplayer.anim( "idle" );

        $cam1.follow( $cin_cells_cam1_pos7, $stammheim );
        $cam1.cut();

        //Stop the forcefield sound, and play the forcefield_down sound
        $stammheim_forcefield.stoploopsound();
        $stammheim_forcefield.playsound( "sound/ships/enterprise/ent_forcefield_down.wav", 0, 1 );
        $stammheim_forcefield.remove();

        wait( 0.1 );

        //Illia: Come on Alexander. I'll get you out of here.
        $fakeplayer.playdialog( "localization/sound/dialog/map10/Illia/comeonalexander.mp3", 1, 10000, 0 );
        waitForDialog( $fakeplayer );

        //Illia: Try to follow me, ok?
        $fakeplayer.playdialog( "localization/sound/dialog/map10/Illia/follow.mp3", 1, 10000, 0 );
        waitForDialog( $fakeplayer );

        wait( 1 );

        //Illia: Do you understand?
        $fakeplayer.playdialog( "localization/sound/dialog/map10/Illia/understood.mp3", 1, 10000, 0 );
        $stammheim.anim( "idle_breathing" );
        waitForDialog( $fakeplayer );

        wait( 1.5 );

        //Stammheim: Follow...Yes...
        $stammheim.anim( "conv-yes" );

        $cam1.follow( $cin_cells_cam1_posstammheim, $stammheim );
        //$cam1.cut();

        $stammheim.playdialog( "localization/sound/dialog/map10/Stammheim/follow.mp3", 2, 10000, 0 );
        waitForDialog( $stammheim );
        $stammheim.anim( "idle_breathing" );

        wait( 0.5 );

        //Stammheim: Follow...
        $stammheim.playdialog( "localization/sound/dialog/map10/Stammheim/follow2.mp3", 2, 10000, 0 );
        wait( 1 );

        cin_cells_skip();
}

void cin_cells_skip()
{
        skipthread( "Null" );
        killthread( "cin_cells" );

        cam_fadeout( 1, 0, 0, 0, 1, 0 );
        thread fire_door_01(); //Door should open after cin-Ticknswisted

        wait( 2 );

        //Remove all evidence of before the cin
        $stammheim_forcefield.remove();

        $fakeplayer.warpto( "$cin_cells_illia_pos_inside" );
        removefakeplayer();

        //End the cinematic
        noncinematic();
        clearletterbox( 0.1 );
        cueplayer();

        wait( 0.1 );

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

        //Now that the cinematic is over, make Stammheim follow you
        $stammheim.ai_on();

        //Make the objective complete
        $player.setobjectivecomplete( "findstammheim", 1 );
        $stammheim.missionobjective( 0 );

        //Show the new objective
        $player.setobjectiveshow( "escapewithshuttle", 1 );
}