Revision 697 | Revision 880 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed
// EF2 Level Script File//// Level: map8.bsp// Script By: DrBob, ltiefland, TickNSwisted// Geometry By: TickNSwisted// Created on: 17/04/04// Last Edited on: 03/11/04// Last Edited By: 7o'nine//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"#include "maps/global_scripts/global_archetype.scr"//FUNCTIONSvoid openFirstDoor();void closeFirstDoor();void remove_forcefield();void remove_cave_forcefield();void b03_door_01_unlock();void b03_door_01_relock();void b02_door_01_relock();void finish_intro_cin();void initArchetypes();void main();void setupWorld();void intro_cin();void Puzzle_Used();void Puzzle_Reset();void Puzzle_Solved();//VARIABLE DECLARATIONSfloat func_rem_ff_used = 0;/////////////////////////////////SCRIPT/////////////////////////////////void openFirstDoor (){$openDoorTrigger.playsound ( "sound/environment/switches/switch_01.wav" , 3, .3, 10000 );$openDoorTrigger.playsound ( "sound/ships/romulan/rom_beep_yes.wav" , 7, .3, 10000 );wait( .1 );$openDoorTrigger.nottriggerable ();$OuterDoorPart1.playsound ( "sound/doors/drull_bigdoor_01.wav", 5, 1, 300);$OuterDoorPart1.time( 5 );$OuterDoorPart1.moveUp( 6 );$OuterDoorPart2.time( 5 );$OuterDoorPart2.moveUp( 36 );$OuterDoorPart3.time( 5 );$OuterDoorPart3.moveUp( 66 );$OuterDoorPart4.time( 5 );$OuterDoorPart4.moveUp( 96 );$OuterDoorPart5.time( 5 );$OuterDoorPart5.moveUp( 126 );$DoorPart1.playsound ( "sound/doors/drull_bigdoor_stop_01.wav", 5, 1, 300);waitfor ( $OuterDoorPart5 );wait ( 5 );closeFirstDoor();}void initArchetypes(){thread globalArchetype_Setup( $hint_riddle, "number");thread globalArchetype_Setup( $hint2, "hint2");thread globalArchetype_Setup( $hint3, "hint3");thread globalArchetype_Setup( $hint4, "hint4");thread globalArchetype_Setup( $hint5, "hint5");}void closeFirstDoor(){$openDoorTrigger.playsound ( "sound/environment/switches/switch_01.wav" , 3, .3, 10000 );$openDoorTrigger.playsound ( "sound/ships/romulan/rom_beep_yes.wav" , 7, .3, 10000 );$OuterDoorPart1.playsound ( "sound/doors/drull_bigdoor_01.wav", 5, 1, 300);$OuterDoorPart1.time( 3 );$OuterDoorPart1.moveDown( 6 );$OuterDoorPart2.time( 3 );$OuterDoorPart2.moveDown( 36 );$OuterDoorPart3.time( 3 );$OuterDoorPart3.moveDown( 66 );$OuterDoorPart4.time( 3 );$OuterDoorPart4.moveDown( 96 );$OuterDoorPart5.time( 3 );$OuterDoorPart5.moveDown( 126 );waitfor( $OuterDoorPart1 );$OuterDoorPart1.playsound ( "sound/doors/drull_bigdoor_stop_01.wav", 5, 1, 300);$openDoorTrigger.triggerable ();}void remove_forcefield(){if (func_rem_ff_used == 0) //see if this thread was used previous{$b03_door_02.unlock(); //unlock second door of third building$forcefield.remove(); //remove force field in third building$forcefield_speaker.stoploopsound();$forcefield_speaker.playsound( "sound/ships/enterprise/ent_forcefield_down.wav", 0, 1 );$forcefield_speaker.remove();//delete the forcefield from the worldfunc_rem_ff_used = 1;}else{if (func_rem_ff_used == 1) //if used prior, just play this sound{$forcefield_speaker.playsound( "sound/ships/romulan/rom_beep3.wav", 0, 1 );}}}void b03_door_01_unlock(){$b03_door_01.unlock();// unlock bunker 3's door_01.$b02_door_01.lock();}void b03_door_01_relock(){$b03_door_01.lock();// relock bunker 3's door_01.}void b02_door_01_relock(){$b02_door_01.lock();$b01_door_02.lock();}void remove_cave_forcefield(){$cave_forcefield.playsound( "sound/ships/borg/borg_forcefield1_down.wav");//remove cave forcefield and speaker$cave_forcefield.remove(); //remove cave forcefield and speaker$cave_forcefield_speaker.remove(); //remove cave forcefield and speaker}void main(){$world.weather( "snow", 200 );$world.entity_fade_dist( 3000 );$world.farplane( 2500 );$world.farplane_color ( '0.0875 0.1 0.145' ); //match skybox fog colour$world.farplane_cull( 1 );$world.farplane_fog( 1 );soundtrack( "music/m7l1-attrexian_colony.mus");setupWorld();thread intro_cin();}void setupWorld(){//$illia.remove();//fakeplayer();////DOOR SETUP////$b03_door_01.lock();$b03_door_02.lock();$b02_door_02.unlock();$b02_door_01.unlock();$b01_door_02.unlock();//initialize hintesinitArchetypes();//Setup onUse threads...//Load the mission objectives$player.LoadObjectives( "GBS8" );//Give the player her weapons, and remove the prisoner'sglobalLoadout_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 camerasspawn( "Camera", "targetname", "cam1" );spawn( "Camera", "targetname", "cam2" );spawn( "Camera", "targetname", "cam3" );//Remove NPCs AI$illia.ai_off();$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 FUNCTIONSvoid intro_cin(){skipthread ( "finish_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 );thread finish_intro_cin();}void finish_intro_cin(){killthread("intro_cin");cam_fadein( 3, 0, 0, 0, 1, 0 );$illia_prisoner.remove();$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 );$player.setobjectiveshow( "findstammheim", 1 );}//PUZZLE FUNCTIONSvoid Puzzle_Used(){globalTricorderKeypad_SetType( "Starfleet" );globalTricorderKeypad_SetScannedCodeFlag( 0 );globalTricorderKeypad_SetSecretCode( 3, 1, 4, 1, 5, 0, 0, 0, 0 );//Edited by TICKNSWISTED:changed SecretCode to Pi for ingame clue.//Edited By Argyle: Sorry, the code was too long, good idea about Pi though.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 );cam_fadeout( 1, 0, 0, 0, 1, 0 );freezeplayer();cinematic();letterbox ( 0.1 );$cam3.follow( $map8_ff0 );$cam3.cut();wait( 0.5 );cuecamera( $cam3 );cam_fadein( 1, 0, 0, 0, 1, 0 );wait(1.5);remove_cave_forcefield();wait(4);clearletterbox( 0.1 );releaseplayer();noncinematic();cueplayer();}