Subversion-Projekte sthq.gbs

Revision

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

//  EF2 Level Script File
//
//  Level:              map8.bsp
//  Script By:          DrBob, ltiefland
//  Geometry By:        TickNSwisted
//  Created on:         17/04/04
//  Last Edited on:     27/09/04
//  Last Edited By:     TickNSwisted

//****************************************************************************************************
//      ~SETUP~
//****************************************************************************************************
//INCLUDES
        #include "maps/global_scripts/global_common.scr"
        #include "maps/global_scripts/global_playerLoadout.scr"
        #include "maps/global_scripts/global_debugUtils.scr"
        #include "maps/global_scripts/global_tricorderBase.scr"
        #include "maps/global_scripts/global_tricorderKeypad.scr"
//FUNCTION DECLARATIONS
        //MAP FUNCTIONS
                void remove_forcefield();
                void remove_cave_forcefield();
                void b03_door_01_unlock();
                void b03_door_01_relock();
                void b02_door_01_relock();
        //INHERENT FUNCTIONS
                void main();
                void setupWorld();
        //CINEMATIC FUNCTIONS
                void intro_cin();
        //PUZZLE FUNCTIONS
                void Puzzle_Used();
                void Puzzle_Reset();
                void Puzzle_Solved();
//VARIABLE DECLARATIONS
        //MAP VARIABLES
        //INHERENT VARIABLES
        //CINEMATIC VARIABLES

//********************************************************************************************//FUNCTIONS
//********************************************************************************************//MAP FUNCTIONS
void remove_forcefield()
{
        //Remove the forcefield
        $forcefield.remove();
        // unlock bunker 03's door_02
        $b03_door_02.unlock();

        //Play a sound and remove the speaker
        $forcefield_speaker.stoploopsound();
        $forcefield_speaker.playsound( "sound/ships/enterprise/ent_forcefield_down.wav", 0, 1 );
        $forcefield_speaker.remove();
}

void b03_door_01_unlock()
{
 $b03_door_01.unlock();
 // unlock bunker 03's door_01.
 $b02_door_01.lock();
}

void b03_door_01_relock()
{
 $b03_door_01.lock();
 // relock bunker 03's door_01.
}

void b02_door_01_relock()
{
 $b02_door_01.lock();
 $b01_door_02.lock();
}

void remove_cave_forcefield()
{
        //Remove the forcefield
        $cave_forcefield.remove();
        $cave_forcefield_speaker.remove();
}

//INHERENT FUNCTIONS
void main()
{
        //Setup the world
        $world.weather( "snow", 200 ); 
        $world.entity_fade_dist( 3000 ); 
        setupWorld();

        //Show the cinematic
        intro_cin();

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

void setupWorld()
{
        //$illia.remove();
        //fakeplayer();

        $b03_door_01.lock();
        $b03_door_02.lock();
        $b02_door_02.unlock();
        $b02_door_01.unlock();
        $b01_door_02.unlock();
        //Setup onUse threads...

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

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

        //Give the player her weapons, and remove the prisoner's
        globalLoadout_GiveWeapon( WEAPON_TRICORDER_STX );
        globalLoadout_GiveWeapon( WEAPON_ROMULAN_DISRUPTOR );
        globalLoadout_GiveWeapon( WEAPON_PHASER_STX );
        globalLoadout_GiveWeapon( WEAPON_ASSAULT_SHOTGUN );
        globalLoadout_GiveWeapon( WEAPON_GRENADE_LAUNCHER );
        $player.give( "models/weapons/worldmodel-rom-disruptor-rifle.tik" );
        $illia_prisoner.removeactorweapon ( "CompressionRifle" );
        $illia_prisoner.removeactorweapon ( "AssaultRifle" );
        $illia_prisoner.removeactorweapon ( "CompressionRifleEnhanced" );

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

        //Remove NPCs AI
        $illia_prisoner.ai_off();
        $tebok.ai_off();

        //Set NPCs sides

        //Setup NPC animations

        //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
        $illia_prisoner.pushable( 0 );
        $tebok.pushable( 0 );
        $illia.pushable( 0 );
//      $fakeplayer.pushable( 0 );

        //Hide and notsolid certain things...
        $illia_prisoner.hide();
        $tebok.hide();
        $illia.pushable( 0 );
//      $fakeplayer.hide();

        $illia_prisoner.notsolid();
        $tebok.notsolid();
        $illia.pushable( 0 );
//      $fakeplayer.notsolid();
}

//CINEMATIC FUNCTIONS
void intro_cin()
{
        cam_fadeout( 1, 0, 0, 0, 1, 0 );

        freezeplayer();
        cinematic();
        letterbox ( 0.1 );

        //Make the fakeplayer use the same weapon as you
//      globalCommon_AiActorUseWeapon( $fakeplayer, "current" );
        globalCommon_AiActorUseWeapon( $illia, "current" );

        $cam3.follow( $map8_intro2 );
        $cam3.cut();
        wait( 0.5 );

        cuecamera( $cam3 );

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

        $illia.DisplayEffect( "TransportIn", "Romulan" );
//      $fakeplayer.DisplayEffect( "TransportIn", "Romulan" );
        wait( 2.7 );

        $illia.show();
        $illia.solid();
/*      $fakeplayer.show();
        $fakeplayer.solid();*/
        $cam1.follow( $map8_intro1 );
        $cam1.cut();
        wait( 1 );

        cuecamera( $cam1 );
        wait( 5 );

        cuecamera( $cam3 );

/*      $fakeplayer.playdialog( "localization/sound/dialog/map08/illia/inshorttime.mp3", 1, 10000, 0 );
        waitfordialog( $fakeplayer );*/
        $illia.playdialog( "localization/sound/dialog/map08/illia/inshorttime.mp3", 1, 10000, 0 );
        waitfordialog( $illia );

        wait( 0.05 );

        $cam2.follow( $cell_cam );
        $cam2.cut();
        wait( 0.5 );

        cuecamera( $cam2 );

        $illia_prisoner.show();
        $illia_prisoner.solid();
        $illia_prisoner.anim( "cin-m8_situp" );

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

        $illia_prisoner.playdialog( "localization/sound/dialog/map08/Illia/iwasaware.mp3", 1, 10000, 0 );
        waitfordialog( $illia_prisoner );

        $illia_prisoner.playdialog( "localization/sound/dialog/map08/Illia/stillalive.mp3", 1, 10000, 0 );
        waitfordialog( $illia_prisoner );

        wait( 2 );

        cuecamera( $cam3 );

/*      $fakeplayer.playdialog( "localization/sound/dialog/map08/illia/nochoice.mp3", 1, 10000, 0 );
        waitfordialog( $fakeplayer );*/
        $illia.playdialog( "localization/sound/dialog/map08/illia/nochoice.mp3", 1, 10000, 0 );
        waitfordialog( $illia );

        wait( 0.2 );

        $illia_prisoner.remove();

//      removefakeplayer();

        $illia.hide();
        $illia.notsolid();

        clearletterbox( 0.1 );
        releaseplayer();
        noncinematic();
        cueplayer();

        //Make a new objective appear: find the entrance to the caves
        //Make the blip appear on your radar
        $player.missionobjective( 1 );
        //Make the mission objective appear
        $player.setobjectiveshow( "findentrance", 1 );
}

//PUZZLE FUNCTIONS
void Puzzle_Used()
{
        globalTricorderKeypad_SetType( "Starfleet" );
        globalTricorderKeypad_SetScannedCodeFlag( 0 );
        globalTricorderKeypad_SetSecretCode( 3, 1, 4, 1, 5, 9, 2, 6, 5 );
                //Edited by TICKNSWISTED:changed SecretCode to Pi for ingame clue.
        globalTricorderKeypad_Run( $cave_forcefield_puzzle, 100, 3);
}

void Puzzle_Reset()
{
        $cave_forcefield_puzzle.puzzleobject_reset();
}

void Puzzle_Solved()
{
        $cave_forcefield_puzzle.playsound( "sound/ships/romulan/rom_beep_yes.wav", 0, 1 );
        remove_cave_forcefield();
}