Subversion-Projekte sthq.gbs

Revision

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

// EF2 Level Script File
//
// Level:               map3.bsp
// Script By:           Cortex / Argyle / ltiefland
// Geometry By:         Cortex / Argyle / ltiefland
// Created on:          17/11/03
// Last Edited on:      26/08/04
// Last Edited by:      ltiefland

void main();
void initArchetypes();
void closed_door_sound();
void cpanel();
void panel();
void secretopen();
void secretprint();
void secret();
void comp_found();
void gas1();
void redalert();
void enviromentalcontrols();
void maincomputercontrols();
void compcontrolsa();
void compcontrolsb();
void eng_cin();
void com_cin();
//void switch_alert_on();

float alert_on;

#include "maps/global_scripts/global_archetype.scr"
#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_array.scr"
#include "maps/global_scripts/global_math.scr"
#include "maps/global_scripts/global_acceleratedMovement.scr"
#include "maps/attackplayer.scr"

void main()
{       
//--------------------------------------------------
//      General Level Setup
//--------------------------------------------------

        soundtrack( "music/m6l1.mus" );
        $world.light_fade( "redalert2", .85, .4 );
        $alert_green.show();
        $alert_red.hide();
        $rag.show();
        $rar.hide();
        $roof_hatch.show();
        $roof_hatch.solid();
        $roof_hatch_floor.hide();
        $roof_hatch_floor.notsolid();
        $roof_hatch_cover.hide();
        $roof_hatch_cover.notsolid();
        $player.model("char/hazardteam_jurot.tik");
        $player.give( "models/weapons/worldmodel-tricorder-stx.tik" );
        $bails.give( "models/weapons/worldmodel-tricorder-stx.tik" );
        //Add the objectives list
        $player.loadobjectives( "GBS3" );
        //Make a new objective appear: get to main computer control and Sabotge the engines
        //Make the blip appear on your radar
        $player.missionobjective( 1 );
        //Make the mission objective appear
        $player.setobjectiveshow( "gettoengineering", 1 );
        $illia_prisoner.ai_off();
        $tebok.ai_off();
        $illia_prisoner.pushable(0);
        $tebok.pushable(0);
        $illia_prisoner.hide();
        $tebok.hide();
        $illia_prisoner.notsolid();
        $tebok.notsolid();
        $illia_prisoner.removeactorweapon ( "CompressionRifle" );
        $illia_prisoner.removeactorweapon ( "AssaultRifle" );
        $illia_prisoner.removeactorweapon ( "CompressionRifleEnhanced" );
        $near_end.nottriggerable();
        $player.take ( "models/weapons/worldmodel-compressionrifle.tik" );
        $player.take ( "models/weapons/worldmodel-fieldassaultrifle.tik" );
        $player.take ( "models/weapons/worldmodel-burstrifle.tik" );
        $player.take ( "models/weapons/worldmodel-attrex-rifle.tik" );
        $player.take ( "models/weapons/worldmodel-compressionrifle.tik" );
        $player.take ( "models/weapons/worldmodel-phaser-STX.tik" );

//--------------------------------------------------
//      Red Alert Setup
//--------------------------------------------------

        alert_on = FALSE;
        //alert_on = TRUE;
        $panel_alert_on1.hide();
        $panel_alert_on2.hide();
        $panel_alert_on3.hide();
        $panel_alert_on4.hide();
        $panel_alert_on5.hide();
        $panel_alert_on6.hide();
        $panel_alert_on7.hide();
        $panel_alert_on8.hide();
        $panel_alert_on9.hide();
        $panel_alert_off1.show();
        $panel_alert_off2.show();
        $panel_alert_off3.show();
        $panel_alert_off4.show();
        $panel_alert_off5.show();
        $panel_alert_off6.show();
        $panel_alert_off7.show();
        $panel_alert_off8.show();
        $panel_alert_off9.show();
        $world.light_fade( "redalert", .2, .6 );
        thread redalert();


        //--------------------------------------------------
        //      Camera Setup
        //--------------------------------------------------

        spawn ( "Camera" , "targetname" , "cam1" );
//      cam.load("map3_cam1");
        spawn ( "Camera" , "targetname" , "cam2" );
//      cam.load("map3_cam2");
        spawn ( "Camera" , "targetname" , "cam3" );
//      cam.load("map3_cam3");

        //--------------------------------------------------
        //      Cargobay 4 Setup
        //--------------------------------------------------
        $cargopanelg.hide();
        $cargopanelr.show();
        $cargotubedoor.lock();
        $cargodoors.unlock();
        //--------------------------------------------------
        //      Jefferies Tube Setup
        //--------------------------------------------------
        //      SECRET SETUP
        $secretdoor.lock();
        $secrettrigger.triggerable();
        $secret_red.show();
        $secret_green.hide();
        //      GENERAL SETUP
        $exitdoor.lock();
        $jengdoor.unlock();
        $jdoor1.unlock();
        $jdoor2.lock();
        $jdoor2g.hide();
        $jdoor2r.show();
        //--------------------------------------------------
        //      Main Compter Control Room Setup
        //--------------------------------------------------
        $comroomdoor.lock();
        $engcong.show();
        $engconr.hide();
        $gas1.hide();
        $gas2.hide();
        $gas3.hide();
        $gas4.hide();
        $gas5.hide();
        $gas6.hide();
        $gas7.hide();
        $gas8.hide();
        $hurt1.nottriggerable();
        //--------------------------------------------------
        //      Main Engineering Setup
        //--------------------------------------------------
        $bails.ai_off();
        $bails.useactorweapon( "Tricorder" );
        $bails.removeactorweapon ( "CompressionRifle" );
        $bails.anim( "tricorder_use_loop" );
        $bails.pushable( 0 );

        $jones.ai_off();
        $jones.anim("ent-curvedconsole-gesture");
        $jones.removeactorweapon ( "CompressionRifle" );
        $jones.useactorweapon( "none" );
        $jones.pushable( 0 );

        $shaun.ai_off();
        $shaun.anim("ent-compstation-idle");
        $shaun.removeactorweapon ( "CompressionRifle" );
        $shaun.useactorweapon( "none" );
        $shaun.pushable( 0 );

        $jenks.ai_off();
        $jenks.anim("ent-compstation-gesture1");
        $jenks.removeactorweapon ( "CompressionRifle" );
        $jenks.useactorweapon( "none" );
        $jenks.pushable( 0 );

        $eddie.ai_off();
        $eddie.anim("ent-compstation-gesture1");
        $eddie.removeactorweapon ( "CompressionRifle" );
        $eddie.useactorweapon( "none" );
        $eddie.pushable( 0 );

        $catrin.ai_off();
        $catrin.removeactorweapon ( "CompressionRifle" );
        $catrin.useactorweapon( "none" );
        $catrin.pushable( 0 );

        $engdoor1.time(0.1);
        $engdoor1.moveup(176);

        $holo_excelsior.bind($holo_excelsior_origin);
        $holo_excelsior.followpath( $holo_excelsior_nav1 );

        //--------------------------------------------------
        //      Main Engineering Cinematic Setup
        //--------------------------------------------------

        $illia.ai_off();
        $illia.pushable( 0 );
        $illia.notsolid();
        $illia.hide();

        wait(0.1);

        $walshe.ai_off();
        $walshe.pushable( 0 );
        $walshe.useactorweapon( "EnterpriseDatapad" );
        $walshe.anim( "ent-datapad-use" );

        thread initArchetypes();


        //--------------------------------------------------
        //      Computer Control Room Cinematic Setup
        //--------------------------------------------------

        $illia2.ai_off();
        $illia2.pushable( 0 );
        $illia2.notsolid();
        $illia2.hide();

        wait(0.1);

        $walshe2.ai_off();
        $walshe2.pushable( 0 );
        $walshe2.notsolid();
        $walshe2.hide();

        $com_field.notsolid();
        $com_field.hide();

        //--------------------------------------------------
        //      Security Team Setup
        //--------------------------------------------------

        $security1.setgroupid ( 666 );
        $security1.giveactorweapon( "actorweapons/fed-compressionrifle.tik", 1.0 );
        $security1.useactorweapon( "CompressionRifle" );

        $security2.setgroupid ( 666 );
        $security2.giveactorweapon( "actorweapons/fed-compressionrifle.tik", 1.0 );
        $security2.useactorweapon( "CompressionRifle" );
        /*
           $security3.setgroupid ( 666 );
           $security3.giveactorweapon( "actorweapons/fed-compressionrifle.tik", 1.0 );
           $security3.useactorweapon( "CompressionRifle" );
         */
        AIHideGroup    ( 666 );

        $security4.setgroupid ( 667 );
        $security4.giveactorweapon( "actorweapons/fed-compressionrifle.tik", 1.0 );
        $security4.useactorweapon( "CompressionRifle" );

        AIHideGroup    ( 667 );

}

void climbing_up()
{
        AIShowGroup    ( 667, "Federation" );
        //$security1.ai_on();
        //$security2.ai_on();
        //$security3.ai_on();
        CommandToGroup ( 667 , "groupactortype" , "enemy" , "");
        CommandToGroup ( 667 , "visiondistance" , "4000" , "" );
        CommandToGroup ( 667 , "fov" , "360" , "" );
        CommandToGroup ( 667 , "attack" , "$player" , "" );

}



//--------------------------------------------------
// Archetype Setup
//--------------------------------------------------

// These let you see the information the tricorder displays about an object

void initArchetypes()
{

        thread globalArchetype_Setup( $tubedoor_controls, "tubedoorc");
        thread globalArchetype_Setup( $environmental_controls, "enviroc");
        thread globalArchetype_Setup( $maincomputer_controls, "compc");
        thread globalArchetype_Setup( $computer_a, "compa");
        thread globalArchetype_Setup( $computer_b, "compb");
        thread globalArchetype_Setup( $tubedoor_controls_2, "tubed");

        $bails.archetype ( "bails" );
        $jones.archetype ( "jones" );
        $shaun.archetype ( "shaun" );
        $jenks.archetype ( "jenks" );
        $eddie.archetype ( "eddie" );
        $catrin.archetype ( "catrin" );

}

void closed_door_sound()
{
        $player.playsound( "sound/ships/forever/for_doorbeep", 1, 10000, 0);
        wait(5);
}

//===================================================================
//      Cargo Bay 4
//===================================================================

void cpanel()
{
//-------------------------------------------------------------------
//      This moves the panels covering the power re-routing controls
//-------------------------------------------------------------------
        $cpanel1.moveeast(2);
        $cpanel2.moveeast(2);
        $cpanel3.moveeast(2);

        wait(1);

        $cpanel1.movenorth(77);
        $cpanel2.movesouth(77);
        $cpanel3.movenorth(77);
}

void panel()
{

//-------------------------------------------------------------------
//      This changes the colour of the power re-routing panel and plays
//      the power-up and power-down sounds
//-------------------------------------------------------------------

        $cargopanelr.hide();
        $cargopanelg.show();
        $player.playsound("sound/ships/forever/for_poweron.wav");

        wait(3);

        $cargopanelg.hide();
        $cargopanelr.show();
        $player.playsound("sound/environment/computer/lcars_error.wav");

        wait(1);

        $cargopanelr.hide();
        $cargopanelg.show();
        $player.playsound("sound/ships/forever/for_poweron.wav");

        wait(3);

        $cargopanelg.hide();
        $cargopanelr.show();
        $player.playsound("sound/environment/computer/lcars_error.wav");

        wait(1);

        $cargopanelr.hide();
        $cargopanelg.show();
        $player.playsound("sound/environment/computer/lcars_yes.wav");

        wait(1);

        music( "success" );

        wait(1);

        $jdoorpanel1.movenorth(3);

        wait(2);

        $jdoorpanel1.moveup(70);

        $cargotubedoor.unlock();
        $jdoorpanel1.playsound("sound/ships/forever/for_floorhatch.wav");
}

//==========================================================================
//      The Secret
//==========================================================================

void secretopen()
{
        $secretdoor.unlock();
        $secret_red.hide();
        $secret_green.show();
}

void secretprint()
{
          centerprint("Secret Area!");
}

void secret()
{
        $bob.ai_off();
        $phil.ai_off();
        $phil.playdialog("localization/sound/dialog/map03/Bob/secret.wav",1,10000,0);
        $bob.playdialog("localization/sound/dialog/map03/Bob/secret.wav",1,10000,0);
        wait(15);
        $bob.walkto("$nav2");
        wait(0.7);
        $phil.walkto("$nav2");
}

//===========================================================================
//      Main Computer Control Room
//===========================================================================

//---------------------------------------------------------------------------
//      Tells the player you've found what your looking for
//---------------------------------------------------------------------------

void comp_found()
{
         $illia.playdialog("localization/sound/dialog/map03/Illia/maincomputer.mp3",1,10000,0);//Main Computer Control.
         waitfordialog( $illia );
         wait(1);
         $illia.playdialog("localization/sound/dialog/map03/Illia/perfect.mp3",1,10000,0);//Perfect.
         waitfordialog( $illia );
         wait(1);
}

//---------------------------------------------------------------------------
//      Activates the trap
//---------------------------------------------------------------------------

void gas1()
{
        $gas1.show();
        $gas2.show();
        $gas3.show();
        $gas4.show();
        $gas5.show();
        $gas6.show();
        $gas7.show();
        $gas8.show();
        $jcomdoor.lock();
        $engconr.playsound( "sound/environment/computer/access_denied.wav");
        $player.loopsound( "sound/redalert.mp3", .4, 512 );
        $hurt1.triggerable();
        $comroomdoor.lock();
}

//---------------------------------------------------------------------------
//      Red Alert Setup
//---------------------------------------------------------------------------

void redalert()
{
   if (alert_on)
   {
      $world.light_fade( "redalert", .85, .4 );
      $player.playsound( "sound/redalert.mp3" );
   }
   wait( .7 );

   if (alert_on)
   {
      $world.light_fade( "redalert", .2, .6 );
   }
   wait( 1.8 );

   thread redalert();
}

   //-------------------------------------------------------------------------
   // Move the control panels in the computer room
   //-------------------------------------------------------------------------

void enviromentalcontrols()
{
         $environmental.moveeast(17);
}

void maincomputercontrols()
{
         $maincomputercontrols.movewest(17);
}

void compcontrolsa()
{
         $computera.moveeast(17);
}

void compcontrolsb()
{
         $computerb.movewest(17);
}

//===========================================================================
//      Cinematics
//===========================================================================

void eng_cin()
{

   //---------------------------------------------------------------------------
   //   The sequence stopping you from entering engineering
   //---------------------------------------------------------------------------

        freezeplayer();
        cinematic();

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

        wait(2);

        letterbox ( .1 );

        wait( .5);

        $cam1.follow( $map3_cam1 );
        $cam1.cut();
        wait(.5);

        cuecamera ( $cam1 );

        wait( .5 );

        $player.warp( '277 2667 -254' );

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

        $illia.solid();
        $illia.show();
        $illia.anim( "idle" );
        $illia.useactorweapon( "none" );
        wait(5);

        $walshe.anim( "idle" );
        $walshe.useactorweapon( "none" );       

        wait(1);

        $walshe.walkto("$walshe_eng_nav1");
        $walshe.walkto("$walshe_eng_nav2");
        $walshe.walkto("$walshe_eng_nav3");
        $walshe.walkto("$walshe_eng_nav4");
        $walshe.walkto("$walshe_eng_nav5");

        wait(2);


        $illia.walkto("$illia_eng_nav1");

        wait(8);

        wait(1);        

        $walshe.playdialog("localization/sound/dialog/map03/moya/sorry.mp3", 1, 10000, 0);// I'm Sorry Ms Ericsson.
        waitfordialog( $walshe );
        $walshe.playdialog("localization/sound/dialog/map03/moya/authorized.mp3", 1, 10000, 0);// Only Authorised Personnel May Enter Engineering.
        waitfordialog( $walshe );

        wait(1);

        $illia.walkto("illia_eng_nav_return");

        wait(1);

        $mainengdoor.close();

        wait(1);

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

        wait(1);

        $illia.notsolid();
        $illia.hide();
        $player.warp( '-27 1655 -254');
        $walshe.useactorweapon( "EnterpriseDatapad" );
        $walshe.anim( "ent-datapad-use" );

        wait(1);

        noncinematic();
        clearletterbox( .1 );
        releaseplayer();
        cueplayer();

        wait(0.5);

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

        $player.missionobjective( 1 );
        //Make the mission objective appear
        $player.setobjectivefailed( "gettoengineering", 1 );
        $player.setobjectiveshow( "sabotageengines", 1 );
}

void com_cin()
{

//---------------------------------------------------------------------------
//      The sequence where you get caught messing with the engines.......Doh!
//---------------------------------------------------------------------------

        freezeplayer();
        cinematic();

        wait(1);

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

        wait(2);

        letterbox ( .1 );

        wait( .05 );

        $cam3.follow($map3_cam3);
        $cam3.cut();
        wait( .5);
        cuecamera($cam3);

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

        wait(1);

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

        $illia_prisoner.playdialog("localization/sound/dialog/map03/Illia/thesabotage.mp3",1,10000,0);// Sabotaging The Atlantic Was No Big Deal.
        waitfordialog( $illia_prisoner );
        $illia_prisoner.playdialog("localization/sound/dialog/map03/Illia/virus.mp3",1,10000,0);//I Inserted a Virus Into The Main Compute That Was To Stop Every Attempt At Entering Warp For The Next Few Days.   
        waitfordialog( $illia_prisoner );

        $illia_prisoner.playdialog("localization/sound/dialog/map03/Illia/complete.mp3",1,10000,0);//When I Was Finished With My Small Manipulation Things Began To Take A Turn For The Worse.
        waitfordialog( $illia_prisoner );

        $player.notsolid();
        $player.hide();

        $illia2.show();
        $illia2.solid();
        $walshe2.show();
        $walshe2.solid();
        $comroomdoor.unlock();

        $illia2.useactorweapon( "Tricorder" );
        $illia2.anim( "tricorder_use_loop" );

        $cam2.follow( $map3_cam2 );
        $cam2.cut();
        wait(.5);
        cuecamera ( $cam2 );

        wait( .5 );

        $illia2.turntoangle( 90 );

        $illia2.anim( "idle" );

        $walshe2.walkto("$walshe2_com_nav1");

        wait(3);

        $walshe2.lookat( $illia2 );
        $illia2.lookat( $walshe2 );

        $walshe2.playdialog("localization/sound/dialog/map03/Moya/msericsson.mp3",1,10000,0);// Ms Ericsson?
        waitfordialog( $walshe2 );
        wait(2);
        $walshe2.playdialog("localization/sound/dialog/map03/Moya/doing.mp3",1,10000,0);// What Are You Doing?
        waitfordialog( $walshe2 );
        wait(2);
        //--- Ensign Moya taps his comm badge and calls security
        $walshe2.anim( "tap_comm" );
        waitforanimation( $walshe2, "tap_comm" );
        $walshe2.anim ("idle");
        $walshe2.playdialog("localization/sound/dialog/map03/Moya/security.mp3",1,10000,0);// I Need A Security Team In Engineering.
        waitfordialog( $walshe2 );

        $alert_green.hide();
        $alert_red.show();
        $engcong.hide();
        $engconr.show();

        alert_on = TRUE;
        $panel_alert_on1.show();
        $panel_alert_on2.show();
        $panel_alert_on3.show();
        $panel_alert_on4.show();
        $panel_alert_on5.show();
        $panel_alert_on6.show();
        $panel_alert_on7.show();
        $panel_alert_on8.show();
        $panel_alert_on9.show();
        $panel_alert_off1.hide();
        $panel_alert_off2.hide();
        $panel_alert_off3.hide();
        $panel_alert_off4.hide();
        $panel_alert_off5.hide();
        $panel_alert_off6.hide();
        $panel_alert_off7.hide();
        $panel_alert_off8.hide();
        $panel_alert_off9.hide();

        $illia2.useactorweapon( "Tricorder" );
        $illia2.anim( "tricorder_use_loop" );

        $illia2.turntoangle( 360 );

        $illia2.useactorweapon( "Tricorder" );
        $illia2.anim( "tricorder_use_loop" );

        wait(2);

        $com_field.solid();
        $com_field.show();
        $com_field.playsound( "sound/ships/borg/borg_forcefield_on.wav", 1, 1, 11111 );
        $player.playsound("localization/sound/dialog/m6l1/comp_lockdownini.mp3", 1, 1, 11111); //System lockdown initialized.
        $com_field.loopsound( "sound/ships/enterprise/ent_forcefield.wav", .7, 30 );

        wait(3);

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

        wait(2);

        $illia2.notsolid();
        $illia2.hide();
        $comroomdoor.lock();
        $player.solid();
        $player.show();
        $eng_door3.lock();
        $jack.solid();
        $jack.show();
        $jill.solid();
        $jill.show();
        $walshe2.lookat( $player );

        wait(2);

        noncinematic();
        clearletterbox( .1 );
        releaseplayer();
        cueplayer();
        cam_fadein( 1, 0, 0, 0, 1, 0 );
        //Make the objective complete
        $player.setobjectivecomplete( "sabotageengines", 1 );
        $player.setobjectiveshow("gettocargobay", 1);
        $player.missionobjective(1);
        $near_end.triggerable();
        forcemusic( "action" );

   //-------------------------------------------------------------------------
   // Activates Red Alert and locks and unlocks several doors
   //-------------------------------------------------------------------------

        $jdoor2.unlock();
        $secretdoor.lock();
        $secret_red.show();
        $secret_green.hide();
        $jdoor1.lock();
        $jdoor1_red.show();
        $jdoor1_green.hide();
        $jdoor2g.show();
        $jdoor2r.hide();
        $secrettrigger.nottriggerable();
        $cargotubedoor.lock();
        $jdoorpanel1.movesouth(3);

   //-------------------------------------------------------------------------
   // Close Off Access To Engineering
   //-------------------------------------------------------------------------

        $mainengdoor.lock();
        $cargodoors.lock();
        $exitdoor.unlock();

        $roof_hatch.hide();
        $roof_hatch.notsolid();
        $roof_hatch_floor.show();
        $roof_hatch_floor.solid();
        $roof_hatch_cover.show();
        $roof_hatch_cover.solid();

        wait(2);

        $jdoorpanel1.movedown(70);
        $cargobaydoor.lock();
        $engdoor2.movedown(176);

        // Make security team attack player
        AIShowGroup    ( 666, "Federation" );
        //$security1.ai_on();
        //$security2.ai_on();
        //$security3.ai_on();
        CommandToGroup ( 666 , "groupactortype" , "enemy" , "");
        CommandToGroup ( 666 , "visiondistance" , "4000" , "" );
        CommandToGroup ( 666 , "fov" , "360" , "" );
        CommandToGroup ( 666 , "attack" , "$player" , "" );

}

void levelchange()
{
        stuffcmd("map map4 \n");

}