Subversion-Projekte sthq.gbs

Revision

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

#include "maps/global_scripts/global_common.scr"
#include "maps/global_scripts/global_debugUtils.scr"
#include "maps/global_scripts/global_math.scr"
#include "maps/global_scripts/global_archetype.scr"
#include "maps/m11/m11l1a_dialog.scr"
#include "maps/m11/m11_groupSpawn.scr"
#include "maps/global_scripts/global_playerLoadout.scr"
#include "maps/m11/m11_beamInAmmo.scr"
#include "maps/global_scripts/global_tricorderbase.scr"
#include "maps/global_scripts/global_tricordermod.scr"



float killed_klingons = 0;


void switch_off_ai()
{
   $illia.ai_off();
   $illia2.ai_off();
   $moya.ai_off();
   $moya2.ai_off();
   $death_klingon.ai_off();
   $klingon1.ai_off();
   $klingon3.ai_off();
   $klingon4.ai_off();
   $klingon5.ai_off();
   $klingon6.ai_off();

   $klingon1.killthread("inc_death_toll");
   $klingon3.killthread("inc_death_toll");
   $klingon4.killthread("inc_death_toll");
   $klingon5.killthread("inc_death_toll");
   $klingon6.killthread("inc_death_toll");
}

void show_camera(entity camera_to_use, entity camera_path, float duration_to_wait)
{
   camera_to_use.follow( camera_path );
   cuecamera( camera_to_use );
   wait(.2);
   cam_fadein( 1, 0, 0, 0, 1, 0 );
   wait(duration_to_wait);
   cam_fadeout( 1, 0, 0, 0, 1, 0 );
   wait(1);

}


void start_introcin()
{
   cinematic();
   letterbox(.1);
   cam_fadeout( .1, 0, 0, 0, 1, 0 );
   
   spawn ( "Camera" , "targetname" , "cam1" );
   spawn ( "Camera" , "targetname" , "cam2" );
   spawn ( "Camera" , "targetname" , "cam3" );
   spawn ( "Camera" , "targetname" , "cam4" );
   spawn ( "Camera" , "targetname" , "cam5" );
   spawn ( "Camera" , "targetname" , "cam6" );

   wait ( .05 );
   cam.load("holo2_gate_cam");
   cam.load("holo2_illia_cam");
   cam.load("holo2_illia_cam2");
   cam.load("holo2_klingon_cam");
   cam.load("holo2_illia_close_cam");
   cam.load("holo2_klingon_close_cam");

   wait ( .5);

   switch_off_ai();


   wait(1);

   //   stuffcmd("showmenu we_proudly_present\n");

   // wait(2);

   //  stuffcmd ( "popmenu 0\n" );
   // wait(3);
   stuffcmd("showmenu gbs\n");
   wait(4);
   stuffcmd ( "popmenu 0\n" );

   


   show_camera($cam1, $holo2_gate_cam, 3);
   wait(.5);

   
   show_camera($cam3, $holo2_klingon_cam, 3);
   wait(.5);
   show_camera($cam6, $holo2_illia_cam2, 3);
   wait(.5);
   show_camera($cam5, $holo2_klingon_close_cam, 3);
   wait(.5);
   $world.light_lightstyle( "lightning", "azzazaazzzzz", 0 );
   $player.playsound( "sound/environment/nature/thunder2.wav", 0, 1.5, 10000 );
   show_camera($cam4, $holo2_illia_close_cam, 3);
   wait(.5);
   //wait(5);
}

void finish_introcin()
{
   cam_fadein( 1, 0, 0, 0, 1, 0 );

   noncinematic();
   cueplayer ();
   clearletterbox(.1);
   $illia.hide();
   $illia.notsolid();
   $klingon1.ai_on();
   $klingon3.ai_on();
   $klingon4.ai_on();
   $klingon5.ai_on();
   $klingon6.ai_on();
   $klingon1.attack($player);
   $klingon3.attack($player);
   $klingon4.attack($player);
   $klingon5.attack($player);
   $klingon6.attack($player);



}

void start_holocin()
{
   $illi2.useactorweapon( "CompressionRifle" );

   cinematic();
   letterbox(.1);
   cam_fadeout( .1, 0, 0, 0, 1, 0 );
   spawn ( "Camera" , "targetname" , "holo_cam1" );
   spawn ( "Camera" , "targetname" , "holo_cam2" );
   spawn ( "Camera" , "targetname" , "holo_cam3" );
   spawn ( "Camera" , "targetname" , "holo_cam4" );
   wait ( .05 );
   cam.load("holo2_moya_cam2");
   cam.load("holo2_illia2_cam");
   cam.load("holo2_illia2_cam3");
   cam.load("holo2_moya_cam");

   wait ( .5);

   //switch_off_ai();

   cam_fadeout( 1, 0, 0, 0, 1, 0 );
   wait(1);
   
   $holo_cam2.follow($holo2_illia2_cam);
   $death_klingon.show();
   $illia2.show();
   //$illia2.maxheadyaw(180);
   $illia2.headwatch( $death_klingon );
   $death_klingon.animateonce("long_death");
   wait(.1);
   cuecamera( $holo_cam2 );

   cam_fadein( 1, 0, 0, 0, 1, 0 );
   $illi2.anim("compressionrifle_putaway");
   wait(5.5);
   $illi2.anim("compressionrifle_putaway");
   //$holodeckdoor.open($holodeckdoor);
   $illia2.playsound("sound/ships/enterprise/holo_door_open.wav");
   wait(1);
   $illia2.headwatch( $moya );

   wait(2.5);
 
   $holo_cam1.follow($holo2_moya_cam2);
   wait(.1);
   cuecamera( $holo_cam1 );
   wait(1);
   $death_klingon.remove();
   
   $moya2.walkto("$holodeck_nav1", "walk",0,-1);
   wait(3);
   //$holo_cam3.follow($holo2_illia2_cam);
   //cuecamera( $holo_cam3 );
   cuecamera( $holo_cam2 );
   $illia2.playsound("sound/ships/enterprise/holo_door_open.wav");
   $illia2.lookat( $moya);
   //$illia2.walkto("$battle_nav1", "walk",0,-1);
   //$illia2.resethead();
   //$illi2.useactorweapon( "none" );
   wait(3);


}



void finish_holocin()
{
   cam_fadein( 1, 0, 0, 0, 1, 0 );

   $player.origin($new_player_pos.getOrigin());
   wait(0.05);
   noncinematic();
   cueplayer ();
   clearletterbox(.1);
   $illia2.hide();
   $illia2.notsolid();
   $player.playerviewangles('0 180 0');



}

void inc_death_toll()
{
   killed_klingons++;
   print("Killed Klingons: " + killed_klingons + "\n");
}



void spawn_melee_klingon( entity entity_to_spawn)
{
        entity e;
        string tiki_to_use;
        float random_number;
        random_number = randomint(5);


        if (random_number == 0) tiki_to_use = "char/klingon-m9-merc-batleth-m2.tik";
        if (random_number == 1) tiki_to_use = "char/klingon-m9-merc-knife-m2.tik";
        if (random_number == 2) tiki_to_use = "char/klingon-m9-merc-knife-m1.tik";
        if (random_number == 3) tiki_to_use = "char/klingon-m9-merc-knife-f3.tik";
        if (random_number == 4) tiki_to_use = "char/klingon-m9-merc-batleth-m1.tik";
        entity_to_spawn.modelname(tiki_to_use);
        entity_to_spawn.spawneffectname( "TransportIn", "Idryll" );
        
        
        entity_to_spawn.checkforspace();
        e = entity_to_spawn.spawnnow();
        wait( 0.05 );
        e.attackplayer();
        e.killthread("inc_death_toll");
}


void spawn_disrupter_klingon( entity entity_to_spawn)
{
        entity e;
        string tiki_to_use;
        float random_number;

        random_number = randomint(5);

        if (random_number == 0) tiki_to_use = "char/klingon-m9-merc-disruptor-m1.tik";
        if (random_number == 1) tiki_to_use = "char/klingon-m9-merc-disruptor-m2.tik";
        if (random_number == 1) tiki_to_use = "char/klingon-m9-merc-disruptor-m1.tik";
        if (random_number == 2) tiki_to_use = "char/klingon-m9-merc-disruptor-f1.tik";
        if (random_number == 3) tiki_to_use = "char/klingon-m9-merc-disruptor-f2.tik";
        if (random_number == 4) tiki_to_use = "char/klingon-m9-merc-disruptor-f3.tik";
        entity_to_spawn.modelname(tiki_to_use);


        entity_to_spawn.spawneffectname( "TransportIn", "Idryll" );
        
        
        entity_to_spawn.checkforspace();
        e = entity_to_spawn.spawnnow();
        wait( 0.05 );
        e.attackplayer();
        e.killthread("inc_death_toll");
}


void main()
{
   globalLoadout_AssignWeapons ( "m11l1a_drull_ruins3" );
   

   $world.light_intensity( "lightning", 0 );

   $illia2.notsolid();
   $illia2.hide();
   $death_klingon.notsolid();
   $death_klingon.hide();
   

   switch_off_ai();
   start_introcin();
   finish_introcin();

   wait(1);

   while ( killed_klingons < 5 )
   {
      wait(.5);
   }


   killed_klingons = 0;



  spawn_melee_klingon($wave1klingon1);
  spawn_melee_klingon($wave1klingon3);
  spawn_disrupter_klingon($wave1klingon2);

  while ( killed_klingons < 2 ) 
  {
     wait(.5);
  }
  
  spawn_melee_klingon($wave2klingon1);
  spawn_melee_klingon($wave2klingon3);
  spawn_disrupter_klingon($wave2klingon2);

  while ( killed_klingons < 6 ) 
  {
     wait(.5);
  }
  
   start_holocin();
   finish_holocin();

   spawn_melee_klingon($newKlingon1);
   spawn_melee_klingon($newKlingon3);
   spawn_disrupter_klingon($newKlingon2);
   spawn_disrupter_klingon($newKlingon4);

  


}