Subversion-Projekte sthq.gbs

Revision

Revision 890 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
279 drbob 1
//  EF2 Level Script File
2
//
695 argyle 3
//  Level:		map8.bsp
880 lars 4
//  Script By:	DrBob, ltiefland, TickNSwisted
279 drbob 5
//  Geometry By:	TickNSwisted
880 lars 6
//  Created on:	17/04/04
7
// Last Edited on:  $Date: 2007-10-03 14:57:12 +0200 (Mi, 03 Okt 2007) $
8
// Last Edited by:	$Author: lars $
279 drbob 9
 
10
//INCLUDES
11
	#include "maps/global_scripts/global_common.scr"
12
	#include "maps/global_scripts/global_playerLoadout.scr"
13
	#include "maps/global_scripts/global_debugUtils.scr"
14
	#include "maps/global_scripts/global_tricorderBase.scr"
15
	#include "maps/global_scripts/global_tricorderKeypad.scr"
880 lars 16
    #include "maps/global_scripts/global_archetype.scr"
591 TickNSwist 17
 
18
//FUNCTIONS
604 lars 19
	void openFirstDoor();
20
	void closeFirstDoor();
591 TickNSwist 21
	void remove_forcefield();
22
	void remove_cave_forcefield();
23
	void b03_door_01_unlock();
24
	void b03_door_01_relock();
25
	void b02_door_01_relock();
26
 
695 argyle 27
        void finish_intro_cin();
28
	void initArchetypes();
29
 
591 TickNSwist 30
	void main();
31
	void setupWorld();
32
	void intro_cin();
33
 
34
	void Puzzle_Used();
35
	void Puzzle_Reset();
36
	void Puzzle_Solved();
37
 
279 drbob 38
//VARIABLE DECLARATIONS
591 TickNSwist 39
	float func_rem_ff_used = 0;
279 drbob 40
 
591 TickNSwist 41
 
42
////////////////////////
43
/////////SCRIPT/////////
44
////////////////////////
45
 
604 lars 46
void openFirstDoor ()
47
{
48
	$openDoorTrigger.playsound ( "sound/environment/switches/switch_01.wav" , 3, .3, 10000 );
49
	$openDoorTrigger.playsound ( "sound/ships/romulan/rom_beep_yes.wav" , 7, .3, 10000 );
50
	wait( .1 );
51
 
52
	$openDoorTrigger.nottriggerable ();
888 lars 53
 
54
	$reinhard.setTargetType(1);//Chrisstrahl 2007.05.07
55
	$reinhard.sethatemodifier( 1 );//Chrisstrahl 2007.05.07
56
	$reinhard0.kill();//Chrisstrahl 2007.05.07
57
	wait(.1);
58
	$reinhard0.remove();//Chrisstrahl 2007.05.07
59
    $OuterDoorPart1.playsound ( "sound/doors/drull_bigdoor_01.wav", 5, 1, 300);
604 lars 60
	$OuterDoorPart1.time( 5 );
61
	$OuterDoorPart1.moveUp( 6 );
62
	$OuterDoorPart2.time( 5 );
63
	$OuterDoorPart2.moveUp( 36 );
64
	$OuterDoorPart3.time( 5 );
65
	$OuterDoorPart3.moveUp( 66 );
888 lars 66
 
604 lars 67
	$OuterDoorPart4.time( 5 );
68
	$OuterDoorPart4.moveUp( 96 );
69
	$OuterDoorPart5.time( 5 );
70
	$OuterDoorPart5.moveUp( 126 );
890 avenger 71
	$OuterDoorPart5.playsound ( "sound/doors/drull_bigdoor_stop_01.wav", 5, 1, 300);
72
 
888 lars 73
    waitfor ( $OuterDoorPart5 );
604 lars 74
 
75
	wait ( 5 );
76
    	closeFirstDoor();
888 lars 77
	//Romulan soliders, get em to wake up
78
	$frida.hurt(1);//Chrisstrahl 2007.05.07
79
	$berta.hurt(1);//Chrisstrahl 2007.05.07
80
 
604 lars 81
}
82
 
695 argyle 83
 
84
void initArchetypes()
85
{
86
      thread globalArchetype_Setup( $hint_riddle, "number");
697 argyle 87
      thread globalArchetype_Setup( $hint2, "hint2");
88
      thread globalArchetype_Setup( $hint3, "hint3");
89
      thread globalArchetype_Setup( $hint4, "hint4");
90
      thread globalArchetype_Setup( $hint5, "hint5");
695 argyle 91
 
92
}
93
 
604 lars 94
void closeFirstDoor()
95
{
96
	$openDoorTrigger.playsound ( "sound/environment/switches/switch_01.wav" , 3, .3, 10000 );
97
	$openDoorTrigger.playsound ( "sound/ships/romulan/rom_beep_yes.wav" , 7, .3, 10000 );
98
 
99
    	$OuterDoorPart1.playsound ( "sound/doors/drull_bigdoor_01.wav", 5, 1, 300);
100
	$OuterDoorPart1.time( 3 );
101
	$OuterDoorPart1.moveDown( 6 );
102
	$OuterDoorPart2.time( 3 );
103
	$OuterDoorPart2.moveDown( 36 );
104
	$OuterDoorPart3.time( 3 );
105
	$OuterDoorPart3.moveDown( 66 );
106
	$OuterDoorPart4.time( 3 );
107
	$OuterDoorPart4.moveDown( 96 );
108
	$OuterDoorPart5.time( 3 );
109
	$OuterDoorPart5.moveDown( 126 );
110
	waitfor( $OuterDoorPart1 );
111
 
112
    	$OuterDoorPart1.playsound ( "sound/doors/drull_bigdoor_stop_01.wav", 5, 1, 300);
113
 
114
	$openDoorTrigger.triggerable ();
115
}
116
 
117
 
279 drbob 118
void remove_forcefield()
119
{
591 TickNSwist 120
 if (func_rem_ff_used == 0)	//see if this thread was used previous
121
  {
122
   $b03_door_02.unlock();	//unlock second door of third building
890 avenger 123
	if(doesEntityExist($forcefield)){
124
		$forcefield.remove();	//remove force field in third building
125
	}
126
	if(doesEntityExist($forcefield_speaker)){
127
		$forcefield_speaker.stoploopsound();
128
		$forcefield_speaker.playsound("sound/ships/enterprise/ent_forcefield_down.wav",0,1);
129
		$forcefield_speaker.remove();//delete the forcefield from the world
130
	}
131
 
591 TickNSwist 132
   func_rem_ff_used = 1;
133
  }
134
 else
135
  {
136
   if (func_rem_ff_used == 1)	//if used prior, just play this sound
137
    {
138
     $forcefield_speaker.playsound( "sound/ships/romulan/rom_beep3.wav", 0, 1 );
139
    }
140
  }
279 drbob 141
}
142
 
591 TickNSwist 143
 
586 TickNSwist 144
void b03_door_01_unlock()
145
{
146
 $b03_door_01.unlock();
604 lars 147
 // unlock bunker 3's door_01.
586 TickNSwist 148
 $b02_door_01.lock();
149
}
150
 
151
void b03_door_01_relock()
152
{
153
 $b03_door_01.lock();
604 lars 154
 // relock bunker 3's door_01.
586 TickNSwist 155
}
156
 
587 TickNSwist 157
void b02_door_01_relock()
586 TickNSwist 158
{
890 avenger 159
	if(doesEntityExist($b01_door_02)){
902 lars 160
		$b02_door_01.lock();//Patched 06.sep.2007 @ Chrissstrahl
890 avenger 161
	}
586 TickNSwist 162
}
163
 
591 TickNSwist 164
 
279 drbob 165
void remove_cave_forcefield()
890 avenger 166
{//remove cave forcefield and speaker
167
 
168
	if(doesEntityExist($cave_forcefield)){
169
		$cave_forcefield.playsound( "sound/ships/borg/borg_forcefield1_down.wav");
170
	}
171
	if(doesEntityExist($cave_forcefield)){
172
		$cave_forcefield.remove();	 	//remove cave forcefield and speaker
173
		$cave_forcefield_speaker.remove();	//remove cave forcefield and speaker
174
	}
279 drbob 175
}
176
 
591 TickNSwist 177
 
279 drbob 178
void main()
179
{
573 TickNSwist 180
	$world.weather( "snow", 200 );
586 TickNSwist 181
	$world.entity_fade_dist( 3000 );
604 lars 182
 
183
	$world.farplane( 2500 );
184
	$world.farplane_color ( '0.0875 0.1 0.145' ); //match skybox fog colour
185
	$world.farplane_cull( 1 );
186
	$world.farplane_fog( 1 );
591 TickNSwist 187
 
877 lars 188
	$world.soundtrack( "music/m7l1-attrexian_colony.mus");
279 drbob 189
	setupWorld();
190
 
695 argyle 191
	thread intro_cin();
279 drbob 192
 
193
}
194
 
195
void setupWorld()
196
{
590 lars 197
	//$illia.remove();
198
	//fakeplayer();
279 drbob 199
 
591 TickNSwist 200
	////DOOR SETUP////
586 TickNSwist 201
	$b03_door_01.lock();
202
	$b03_door_02.lock();
890 avenger 203
	//$b02_door_02.unlock();
587 TickNSwist 204
	$b02_door_01.unlock();
890 avenger 205
	if(doesEntityExist($b01_door_02)){
206
		$b01_door_02.unlock();
207
	}
591 TickNSwist 208
 
697 argyle 209
	//initialize hintes
210
        initArchetypes();
211
 
279 drbob 212
	//Setup onUse threads...
213
 
214
 
215
	//Load the mission objectives
604 lars 216
	$player.LoadObjectives( "GBS8" );
279 drbob 217
 
218
	//Give the player her weapons, and remove the prisoner's
219
	globalLoadout_GiveWeapon( WEAPON_TRICORDER_STX );
888 lars 220
	globalLoadout_GiveWeapon( WEAPON_PHASER_STX );
279 drbob 221
	globalLoadout_GiveWeapon( WEAPON_ROMULAN_DISRUPTOR );
888 lars 222
	globalLoadout_GiveWeapon( WEAPON_COMPRESSION_RIFLE );
223
	globalLoadout_GiveWeapon( WEAPON_BURST_RIFLE );
279 drbob 224
	globalLoadout_GiveWeapon( WEAPON_ASSAULT_SHOTGUN );
888 lars 225
	//globalLoadout_GiveWeapon( WEAPON_GRENADE_LAUNCHER );
279 drbob 226
	$illia_prisoner.removeactorweapon ( "CompressionRifle" );
227
	$illia_prisoner.removeactorweapon ( "AssaultRifle" );
228
	$illia_prisoner.removeactorweapon ( "CompressionRifleEnhanced" );
229
 
230
	//Spawn cameras
231
	spawn( "Camera", "targetname", "cam1" );
232
	spawn( "Camera", "targetname", "cam2" );
233
	spawn( "Camera", "targetname", "cam3" );
234
 
235
	//Remove NPCs AI
604 lars 236
	$illia.ai_off();
279 drbob 237
	$illia_prisoner.ai_off();
238
	$tebok.ai_off();
239
 
240
	//Set NPCs sides
241
 
242
	//Setup NPC animations
243
 
244
	//Setup NPC facial animation
890 avenger 245
	if(doesEntityExist($stammheim)){
246
		$stammheim.morph( "exp_eyes_heavy" );
247
		$stammheim.morph( "exp_Nervous" );
248
		$stammheim.morph( "exp_Fear" );
249
		$stammheim.morph( "exp_Sad" );
250
	}
279 drbob 251
 
252
	//Make NPCs non-pushable
253
	$illia_prisoner.pushable( 0 );
254
	$tebok.pushable( 0 );
590 lars 255
	$illia.pushable( 0 );
256
//	$fakeplayer.pushable( 0 );
279 drbob 257
 
258
	//Hide and notsolid certain things...
259
	$illia_prisoner.hide();
260
	$tebok.hide();
590 lars 261
	$illia.pushable( 0 );
262
//	$fakeplayer.hide();
279 drbob 263
 
264
	$illia_prisoner.notsolid();
265
	$tebok.notsolid();
590 lars 266
	$illia.pushable( 0 );
267
//	$fakeplayer.notsolid();
877 lars 268
	$player.use("fieldassaultrifle");
279 drbob 269
}
270
 
271
//CINEMATIC FUNCTIONS
217 lars 272
void intro_cin()
273
{
695 argyle 274
	skipthread ( "finish_intro_cin" );
275
 
279 drbob 276
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
277
 
217 lars 278
	freezeplayer();
279
	cinematic();
279 drbob 280
	letterbox ( 0.1 );
217 lars 281
 
279 drbob 282
	//Make the fakeplayer use the same weapon as you
590 lars 283
//	globalCommon_AiActorUseWeapon( $fakeplayer, "current" );
877 lars 284
	globalCommon_AiActorUseWeapon( $illia, "fieldassaultrifle" );
217 lars 285
 
279 drbob 286
	$cam3.follow( $map8_intro2 );
287
	$cam3.cut();
288
	wait( 0.5 );
217 lars 289
 
279 drbob 290
	cuecamera( $cam3 );
291
 
217 lars 292
	cam_fadein( 1, 0, 0, 0, 1, 0 );
590 lars 293
	$illia.DisplayEffect( "TransportIn", "Romulan" );
294
//	$fakeplayer.DisplayEffect( "TransportIn", "Romulan" );
279 drbob 295
	wait( 2.7 );
217 lars 296
 
590 lars 297
	$illia.show();
298
	$illia.solid();
299
/*	$fakeplayer.show();
300
	$fakeplayer.solid();*/
279 drbob 301
	$cam1.follow( $map8_intro1 );
217 lars 302
	$cam1.cut();
279 drbob 303
	wait( 1 );
217 lars 304
 
279 drbob 305
	cuecamera( $cam1 );
306
	wait( 5 );
217 lars 307
 
279 drbob 308
	cuecamera( $cam3 );
217 lars 309
 
590 lars 310
/*	$fakeplayer.playdialog( "localization/sound/dialog/map08/illia/inshorttime.mp3", 1, 10000, 0 );
311
	waitfordialog( $fakeplayer );*/
312
	$illia.playdialog( "localization/sound/dialog/map08/illia/inshorttime.mp3", 1, 10000, 0 );
313
	waitfordialog( $illia );
217 lars 314
 
279 drbob 315
	wait( 0.05 );
217 lars 316
 
279 drbob 317
	$cam2.follow( $cell_cam );
217 lars 318
	$cam2.cut();
279 drbob 319
	wait( 0.5 );
217 lars 320
 
279 drbob 321
	cuecamera( $cam2 );
322
 
217 lars 323
	$illia_prisoner.show();
324
	$illia_prisoner.solid();
279 drbob 325
	$illia_prisoner.anim( "cin-m8_situp" );
217 lars 326
 
327
	cam_fadein( 3, 0, 0, 0, 1, 0 );
328
 
279 drbob 329
	$illia_prisoner.playdialog( "localization/sound/dialog/map08/Illia/iwasaware.mp3", 1, 10000, 0 );
217 lars 330
	waitfordialog( $illia_prisoner );
279 drbob 331
 
332
	$illia_prisoner.playdialog( "localization/sound/dialog/map08/Illia/stillalive.mp3", 1, 10000, 0 );
217 lars 333
	waitfordialog( $illia_prisoner );
334
 
279 drbob 335
	wait( 2 );
217 lars 336
 
279 drbob 337
	cuecamera( $cam3 );
217 lars 338
 
590 lars 339
/*	$fakeplayer.playdialog( "localization/sound/dialog/map08/illia/nochoice.mp3", 1, 10000, 0 );
340
	waitfordialog( $fakeplayer );*/
341
	$illia.playdialog( "localization/sound/dialog/map08/illia/nochoice.mp3", 1, 10000, 0 );
342
	waitfordialog( $illia );
217 lars 343
 
279 drbob 344
	wait( 0.2 );
217 lars 345
 
695 argyle 346
	thread finish_intro_cin();
347
}
348
 
349
void finish_intro_cin()
350
{
351
   	killthread("intro_cin");
352
	cam_fadein( 3, 0, 0, 0, 1, 0 );
279 drbob 353
	$illia_prisoner.remove();
590 lars 354
	$illia.hide();
355
	$illia.notsolid();
356
 
888 lars 357
	$player.origin('192.00 -1.00 -20.00');//Chrisstrahl 2007.05.07, warped player to illia cin possition back to avoid char stuck
279 drbob 358
	clearletterbox( 0.1 );
217 lars 359
	releaseplayer();
360
	noncinematic();
361
	cueplayer();
279 drbob 362
 
363
	//Make a new objective appear: find the entrance to the caves
217 lars 364
	//Make the blip appear on your radar
365
	$player.missionobjective( 1 );
366
	//Make the mission objective appear
367
	$player.setobjectiveshow( "findentrance", 1 );
695 argyle 368
	$player.setobjectiveshow( "findstammheim", 1 );
369
 
370
 
217 lars 371
}
372
 
279 drbob 373
//PUZZLE FUNCTIONS
374
void Puzzle_Used()
217 lars 375
{
888 lars 376
	//globalTricorderKeypad_SetType( "Starfleet" );
377
	globalTricorderKeypad_SetType( "romulan" );
279 drbob 378
	globalTricorderKeypad_SetScannedCodeFlag( 0 );
697 argyle 379
	globalTricorderKeypad_SetSecretCode( 3, 1, 4, 1, 5, 0, 0, 0, 0 );
456 TickNSwist 380
		//Edited by TICKNSWISTED:changed SecretCode to Pi for ingame clue.
697 argyle 381
		//Edited By Argyle: Sorry, the code was too long, good idea about Pi though.
279 drbob 382
	globalTricorderKeypad_Run( $cave_forcefield_puzzle, 100, 3);
383
}
384
 
385
void Puzzle_Reset()
386
{
387
	$cave_forcefield_puzzle.puzzleobject_reset();
388
}
389
 
390
void Puzzle_Solved()
391
{
392
	$cave_forcefield_puzzle.playsound( "sound/ships/romulan/rom_beep_yes.wav", 0, 1 );
697 argyle 393
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
394
 
395
	freezeplayer();
396
	cinematic();
397
	letterbox ( 0.1 );
398
 
399
 
400
	$cam3.follow( $map8_ff0 );
401
	$cam3.cut();
402
	wait( 0.5 );
403
 
404
	cuecamera( $cam3 );
405
 
406
	cam_fadein( 1, 0, 0, 0, 1, 0 );
407
 
408
	wait(1.5);
409
 
279 drbob 410
	remove_cave_forcefield();
697 argyle 411
 
412
 
413
	wait(4);
414
 
415
	clearletterbox( 0.1 );
416
	releaseplayer();
417
	noncinematic();
418
	cueplayer();
695 argyle 419
}