Revision 880 | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed
//-----------------------------------------------------------------// EF2 Level Script File//// Level: map4// Script By: Nemo22, Argyle, TickNSwisted, LTiefland, Avenger// Geometry By: Argyle, TickNSwisted// Created on: 01/04/2004// Last Edited on: $Date: 2007-06-20 22:47:49 +0200 (Mi, 20 Jun 2007) $// Last Edited by: $Author: avenger $//-----------------------------------------------------------------float cadet1_pos, crew1_pos, lift_a_height, lift_b_height, lift_a_pos, lift_b_pos, player_pos;void main();void lock_lab_entry();void initArchetypes();void init();void trigger_shower_door();void wall_exp();void redalert();void kraftfeld();void poison_gas();void before_lab();void inside_lab();void secret_button();void koi_swim();void move_lifta();void move_liftb();void beamout_puzzle();void beamout();void closed_door_sound();void closed_door_sound_2();void puzzleUsed();void puzzleReset();void puzzleSolved();#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_playerLoadout.scr"#include "maps/global_scripts/global_debugUtils.scr"#include "maps/global_scripts/global_tricorderBase.scr"#include "maps/global_scripts/global_tricorderKeypad.scr"#include "maps/global_scripts/global_archetype.scr"#include "maps/attackplayer.scr"void move_lifta(){wait(3);$trigger_lift_a_low.nottriggerable();$trigger_lift_a_up.nottriggerable();if (crew1_pos==0){$lift_a.moveup(lift_a_height);lift_a_pos=2;waitfor($lift_a);lift_a_pos=1;$crew1.walkto("$lift_a_nav2");waitfor($crew1);wait(3);$crew1.walkto("$lift_a_nav3");waitfor($crew1);$lift_a.movedown(lift_a_height);lift_a_pos=2;waitfor($lift_a);lift_a_pos=0;crew1_pos=1;}else{if (lift_a_pos==0){wait(3);$lift_a.moveup(lift_a_height);waitfor($lift_a);lift_a_pos=1;}else{wait(3);$lift_a.movedown(lift_a_height);waitfor($lift_a);lift_a_pos=0;}}wait(10);$trigger_lift_a_low.triggerable();$trigger_lift_a_up.triggerable();}void move_liftb(){$trigger_lift_b_low.nottriggerable();$trigger_lift_b_up.nottriggerable();if (cadet1_pos==1){$lift_b.moveup(lift_b_height);lift_b_pos=2;wait(3);lift_b_pos=1;$cadet1.walkto("$lift_b_nav2");waitfor($cadet1);$lift_b.movedown(lift_b_height);lift_b_pos=2;waitfor($lift_b);lift_b_pos=0;$cadet1.walkto("$lift_b_nav3");waitfor($cadet1);$cadet1.walkto("$lift_b_nav4");waitfor($cadet1);cadet1_pos=0;}else{if (lift_b_pos==0){wait(3);$lift_b.moveup(lift_b_height);waitfor($lift_b);lift_b_pos=1;}else{wait(3);$lift_b.movedown(lift_b_height);waitfor($lift_b);lift_b_pos=0;}}wait(10);$trigger_lift_b_low.triggerable();$trigger_lift_b_up.triggerable();}void main(){waitforPlayer();//what the hell, it was missingthread initArchetypes();spawn("camera","targetname","cam1");$end_trigger.nottriggerable();$player.give( "models/weapons/worldmodel-tricorder-STX.tik" );$player.model( "char/hazardteam_jurot.tik" );thread init();thread redalert();koi_swim();lift_a_height=80;lift_b_height=192;lift_a_pos=0;lift_b_pos=0;crew1_pos=0;cadet1_pos=1;$xmas_door.lock();$7_door.lock();}void before_lab(){$kraftfeld2.show();$kraftfeld2.solid();triggerentity( $kraftfeld_sound2 );$kraftfeld2.playsound( "sound/ships/borg/borg_forcefield_on.wav", 1, 1, 11111 );$kraftfeld2.loopsound( "sound/ships/enterprise/ent_forcefield.wav", .7, 30 );}void inside_lab(){//AIShowGroup ( 666, "Federation" );$kraftfeld3.show();$kraftfeld3.solid();triggerentity( $kraftfeld_sound3 );$kraftfeld3.playsound( "sound/ships/borg/borg_forcefield_on.wav", 1, 1, 11111 );$kraftfeld3.loopsound( "sound/ships/enterprise/ent_forcefield.wav", .7, 30 );$lab_exit2.time( 1.5 );wait( .1 );$lab_exit2.moveUp( 120 );triggerentity( $lab_exit2_sound );$lab_security1.ai_off();$lab_security2.ai_off();$lab_security4.ai_off();$lab_security3.ai_off();wait( 0.5 );$lab_security1.walkto( "$lab_security1_nav1", "run" );wait( 0.2 );$lab_security2.walkto( "$lab_security2_nav1", "run" );wait( 3 );$lab_exit2.movedown( 120 );triggerentity( $lab_exit2_sound );CommandToGroup ( 666 , "groupactortype" , "enemy" , "");CommandToGroup ( 666 , "visiondistance" , "4000" , "" );CommandToGroup ( 666 , "fov" , "360" , "" );CommandToGroup ( 666 , "attack" , "$player" , "" );$lab_security1.ai_on();$lab_security2.ai_on();wait(3);$lab_exit1.time( 1.5 );wait( .1 );$lab_exit1.moveUp( 120 );wait( 0.5 );$lab_security4.walkto( "$lab_security4_nav1", "run" );wait( 0.2 );$lab_security3.walkto( "$lab_security3_nav1", "run" );wait( 3 );$lab_exit1.movedown( 120 );$lab_security4.ai_on();$lab_security3.ai_on();}void secret_button(){$obj_button01.time (1);$obj_button01.movenorth (2);$xmas_door.unlock();$xmas_trigger.nottriggerable();}void koi_swim(){wait(1);$koi1.anim( "idle" );$koi1.followpath( $koi1_path , "loop" , "normalangles" );$koi2.anim( "idle" );$koi2.followpath( $koi2_path , "loop" , "normalangles" );}void init(){//--hide forcefield$kraftfeld.hide();$kraftfeld2.hide();$kraftfeld3.hide();$kraftfeld.notsolid();$kraftfeld2.notsolid();$kraftfeld3.notsolid();$kraft_feld_poison.hide();$kraft_feld_poison.notsolid();//--Showergirl SetUp$showergirl1.ai_off();$showergirl1.anim("conv-gesture1");$shower_door_trigger.nottriggerable();//--Explosion trigger$trigger1.nottriggerable();//--Door to bathroom$shower_door_left.time( .1 );$shower_door_right.time( .1 );wait( .1 );$shower_door_left.moveWest( 40 );$shower_door_right.moveEast( 40 );//--Gas im Korridor$gas.hide();// Security Team$lab_security1.setgroupid ( 666 );$lab_security2.setgroupid ( 666 );$lab_security4.setgroupid ( 666 );$lab_security3.setgroupid ( 666 );AIHideGroup ( 666 );// Beamout sequenceif(doesEntityExist($illia_beamout)){$illia_beamout.hide();$illia_beamout.notsolid();$illia_beamout.ai_off();$illia_beamout.pushable(0);}spawn ( "Camera" , "targetname" , "cam1" );//Take away weapons from illia!if(doesEntityExist($illia_beamout)){$illia_beamout.removeactorweapon ( "CompressionRifle" );$illia_beamout.removeactorweapon ( "AssaultRifle" );$illia_beamout.removeactorweapon ( "CompressionRifleEnhanced" );}//Take away weapons from player!//Only tricorder remains in place!$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" );}void trigger_shower_door(){$shower_door_left.time( .35 );$shower_door_right.time( .35 );wait( .1 );$shower_door_left.playsound( "sound/doors/forever_door1.wav" );$shower_door_left.moveEast( 40 );$shower_door_right.moveWest( 40 );wait( 3 );$shower_door_trigger.triggerable();}/////////////////////////////Wand fliegt in die Luft/////////////////////////////void wall_exp(){//$wall_puzzle.nottriggerable();triggerentity( $blabla_tut );triggerentity( $blabla_tut_overload );wait( 3.8 );$trigger1.triggerable();triggerentity( $trigger );$console.playsound( "sound/impact/explosion/expl_inside4.wav" );triggerentity( $console_exp );$player.earthquake( .75, 1.4 );$wall_hide.hide();wait( .2 );$console.playsound( "sound/impact/explosion/expl_inside3.wav" );triggerentity( $console_exp1 );$console.hide();$console.notsolid();}//////////////////////////////////////////////////////////////////////////Roter Alarm///////////////////////Wenn möglich nur target_speaker in den Korridoren///////////////////////////////////////////////////////void redalert(){$world.light_fade( "redalert", .85, .4 );$player.playsound( "sound/redalert.mp3" );wait( .7 );$world.light_fade( "redalert", .2, .6 );wait( 1.8 );thread redalert();}//////////////////////////////////////////Kraffelder + Sound schalten sich ein//////////////////////////////////////////void kraftfeld(){$gas.show();$kraftfeld.show();$kraftfeld.solid();triggerentity( $kraftfeld_sound );$kraftfeld.playsound( "sound/ships/borg/borg_forcefield_on.wav", 1, 1, 11111 );$kraftfeld.loopsound( "sound/ships/enterprise/ent_forcefield.wav", .7, 30 );wait( 1 );$player.simpleplaydialog( "localization/sound/dialog/map04/computer/intruder.mp3", 1, 20000 ); //Lieutenant Munro, you have a visitor waiting for you in the main entrance.waitDialogLength( "localization/sound/dialog/map04/computer/intruder.mp3" );thread poison_gas();$player.simpleplaydialog( "localization/sound/dialog/map04/computer/gas.mp3", 1, 20000 ); //Lieutenant Munro, you have a visitor waiting for you in the main entrance.waitDialogLength( "localization/sound/dialog/map04/computer/gas.mp3" );}void poison_gas(){//////////////////////////////30 SEKUNDEN//////////////////////////////////////////////////////////////////bis der Spieler stirbt/////////////////////////////////////Wenn er oder sie 100 Health hat.//"lebendesspielers", mir fiel nichts besseres ein!//Note: Um den Timer zu verändern, kann man zwei Werte verändern.// Der erste Wert ist dazu da, um festzulegen, wie wiel Schaden// verursacht wird. Der zweite Wert ist dazu da, um festzulegen// wann der Spieler wieder verletzt wird.//HINWEIS: Wenn du nicht durch das Loch kommst, dann duck dich!//First Get Initial Value of Chang's lifefloat lebendesspielers;lebendesspielers = $player.gethealth();//Now, continue looping until chang is dead. If chang is saved//before he dies, then killthread MUST be called on this thread//to stop this counterwhile( lebendesspielers > 1.0 ){//Every iteration damage the player$player.hurt( 5 );lebendesspielers = $player.gethealth();//print ("end of cinematic thread life counter\n");//Check if chang is 'dead". If he is, then fail the missionif ( lebendesspielers <= 1.0 ){wait( 1 );stuffcmd ( "kill\n" );}//Wait a specified interval before damaging againwait( 1.5 );}}void stop_poison_gas(){killthread( "poison_gas" );triggerentity( $kraft_feld_poison_sound );$kraft_feld_poison.show();$kraft_feld_poison.solid();}void beamout_puzzle(){$player.simpleplaydialog("localization/sound/dialog/map04/Computer/energy.mp3",1,10000);waitdialoglength("localization/sound/dialog/map04/Computer/energy.mp3");$end_trigger.triggerable();}void beamout(){freezeplayer();cinematic();fakeplayer();$fakeplayer.warpto( "$beamout_nav" );letterbox(.1);cam_fadeout( 2, 0, 0, 0, 1, 0 );$cam1.follow($beamout_cam);cuecamera($cam1);wait(.5);cam_fadein( 0.5, 0, 0, 0, 1, 0 );//Bring up a fake player model//Make the fakeplayer use the same weapon as youglobalCommon_AiActorUseWeapon( $fakeplayer, "current" );$fakeplayer.displayEffect( "TransportOut", "Federation" );wait(3);cam_fadeout( 2, 0, 0, 0, 1, 0 );clearletterbox(.1);noncinematic();removefakeplayer();releaseplayer();cueplayer();stuffcmd("map map5");cam_fadein( 0.5, 0, 0, 0, 1, 0 );}void initArchetypes(){thread globalArchetype_Setup( $exp_console, "exp");thread globalArchetype_Setup( $beam_console, "beama");if(doesEntityExist($bails)){$bails.archetype ( "bails" );}if(doesEntityExist($jones)){$jones.archetype ( "jones" );}if(doesEntityExist($shaun)){$shaun.archetype ( "shaun" );}if(doesEntityExist($jenks)){$jenks.archetype ( "jenks" );}if(doesEntityExist($eddie)){$eddie.archetype ( "eddie" );}if(doesEntityExist($catrin)){$catrin.archetype ( "catrin" );}}void lock_lab_entry(){AIShowGroup ( 666, "Federation" );$lab_entry.lock();}void closed_door_sound(){$player.playsound( "sound/doors/door_locked.wav");}void closed_door_sound_2(){$player.playsound( "sound/environment/computer/lcars_no.wav");}//Secret Room Puzzlevoid puzzleUsed(){globalTricorderKeypad_SetType( "Starfleet" );globalTricorderKeypad_SetScannedCodeFlag( 0 );globalTricorderKeypad_SetSecretCode( 7, 9, 7, 9, 0, 0, 0, 0, 0 ); //4 digit codeglobalTricorderKeypad_Run( $secretRoomPuzzle, 100, 3);}void puzzleReset(){$secretRoomPuzzle.puzzleobject_reset();}void puzzleSolved(){$secretRoomPuzzle.playsound( "sound/ships/romulan/rom_beep_yes.wav", 0, 1 );$7_door.unlock();$7_trigger.nottriggerable();trigger( "$7_door" );$secretRoomPuzzle.remove(); //so that player doesn't have to keep re-entering the puzzle code}