Subversion-Projekte sthq.gbs

Revision

Revision 885 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
885 lars 1
//--------------------------------------------------------------------------------------
2
//
3
//  EF2 Level Script File
4
//
5
//  Level:		Map5
6
//  Script By:	Nemo22, Cortex, LTiefland, TickNSwisted
7
//  Geometry By:	Nemo22, TickNSwisted, Argyle
8
//  Created on:	07.02.2004
9
//
10
// Last Edited on:  $Date: 2007-06-20 22:47:49 +0200 (Mi, 20 Jun 2007) $
11
// Last Edited by:	$Author: avenger $
12
//
13
//--------------------------------------------------------------------------------------
14
 
15
#include "maps/global_scripts/global_common.scr"
16
#include "maps/global_scripts/global_math.scr"
17
#include "maps/global_scripts/global_acceleratedMovement.scr"
18
#include "maps/global_scripts/global_cinematicFX.scr"
19
#include "maps/global_scripts/global_archetype.scr"
20
#include "maps/attackplayer.scr"
21
 
22
void main();
23
void initArchetypes();
24
void init();
25
void first_shot();
26
void finish_introcin();
27
void bay_sec_beamin();
28
void sec_shoot();
29
void shuttle_open();
30
void finish_awaycin();
31
void shuttle_away();
32
void shuttle_inside_sparks();
33
void sparks();
34
void redalert();
35
void closed_door_sound();
36
 
37
void shuttlesparks();
38
void bill_ex();
39
 
40
void main()
41
{
42
	initArchetypes();
43
	cam_fadeout( .1, 0, 0, 0, 1, 0 );
44
	$player.notsolid();
45
	$player.hide();
46
	letterbox( .1 );
47
	allowMusicDucking( 0 );
48
	freezeplayer();
49
	cinematic();
50
 
51
	$world.canShakeCamera( 1 );
52
 
53
	init();
54
 
55
	thread first_shot();
56
	soundtrack( "music/m8l2a.mus");
57
}
58
 
59
 
60
void initArchetypes()
61
{
62
 
63
      thread globalArchetype_Setup( $console_hint1, "mdoor");
64
      thread globalArchetype_Setup( $console_hint2, "sdoor");
65
 
66
}
67
 
68
void init()
69
{
70
 
71
   	//$shuttle_stay.solid();
72
   	$ramp_blocker.notsolid();
73
 
890 avenger 74
	if(doesEntityExist($npcs_off)){
75
		$npcs_off.notsolid();
76
		$npcs_off.hide();
77
		$npcs_off.ai_off();
78
	}
885 lars 79
 
80
	$world.light_fade( "light_red", 0, 1 );
81
 
82
	$player.give( "models/weapons/worldmodel-tricorder-STX.tik" );
83
 
84
	$atlantic_out_origin.loopsound( "sound/ships/enterprise/ent_exterior_01.wav", 1 ,1024 );
85
 
86
//--Das Shuttle, das wegfliegt:
87
	$shuttle_fly_away_door.bind( $shuttle_origin );
88
	$shuttle_fly_away_ext.bind( $shuttle_origin );
89
	$shuttle_fly_away_door.hide();
90
	$shuttle_fly_away_ext.hide();
91
 
92
//--Kameras laden und spawnen
93
/*	cam.load( "map5_p_illia1" );
94
	cam.load( "map5_shuttle_cam1" );
95
	cam.load( "map5_shuttle_cam1d" );
96
	cam.load( "map5_shuttle_cam2" );
97
	cam.load( "map5_shuttle_cam3" );
98
	cam.load( "map5_shuttle_cam4" );
99
	cam.load( "map5_shuttle_path" );
100
	cam.load( "map5_cam_shuttle" );
101
	cam.load( "map5_jim_beamin" );
102
	cam.load( "map5_atlantic_last_shot" );*/
103
 
104
	spawn( "Camera", "targetname", "cam1");
105
	spawn( "Camera", "targetname", "cam2");
106
	spawn( "Camera", "targetname", "cam3");
107
 
108
//--Illia SetUp
109
//	$illia_shuttle.pushable( 1 );
110
	globalCommon_AiActorUseWeapon( $illia_shuttle, "none" );
111
	$illia_shuttle.ai_off();
112
	$illia_shuttle.pushable( 0 );
113
	$illia_shuttle.hide();
114
	$illia_shuttle.notsolid();
115
 
116
	globalCommon_AiActorUseWeapon( $ceilling_illia, "none" );
117
	$ceilling_illia.ai_off();
118
	$ceilling_illia.pushable( 0 );
119
	$ceilling_illia.hide();
120
	$ceilling_illia.notsolid();
121
 
122
	globalCommon_AiActorUseWeapon( $illia_shuttle_inside, "none" );
123
	$illia_shuttle_inside.ai_off();
124
	$illia_shuttle_inside.anim( "ent-frontchair-gesture1" );
125
	$illia_shuttle_inside.pushable( 0 );
126
 
127
//--Illia_prisoner SetUp
128
	$illia_prisoner.pushable( 0 );
129
	$illia_prisoner.notsolid();
130
	$illia_prisoner.ai_off();
131
	globalCommon_AiActorUseWeapon( $illia_prisoner, "none" );
132
	globalCommon_AiDummy( $illia_prisoner, "" );
133
	$illia_prisoner.anim("cin-m8_situp");
134
 
135
//--people in Engineering
136
	$jones0.ai_off();
137
	globalCommon_AiActorUseWeapon( $jones0, "none" );
138
	$shaun0.ai_off();
139
	globalCommon_AiActorUseWeapon( $shaun0, "none" );
140
	$bails0.ai_off();
141
	$bails0.pushable( 0 );
142
	globalCommon_AiActorUseWeapon( $bails0, "none" );
143
 
144
	$jones0.anim( "ent-curvedconsole-gesture" );
145
	$shaun0.anim( "ent-compstation-idle" );
146
	$bails0.anim( "ent-compstation-gesture1" );
147
 
148
//--Moya
149
	$moya.ai_off();
150
 
151
//--Security team setup
152
	$sec_1.ai_off();
153
	$sec_1.pushable( 0 );
154
/*	$sec_1.notsolid();
155
	$sec_1.hide();*/
156
	$sec_1.setgroupid ( 668 );
157
 
158
	//$sec_1.giveactorweapon( "actorweapons/fed-compressionrifle.tik", 1.0 );
159
	//$sec_1.useactorweapon( "CompressionRifle" );
160
//	$sec_1.anim( "idle_weapon_legs" );
161
	$sec_1.anim( "compressionrifle_aim" );
162
 
163
	$sec_2.ai_off();
164
	$sec_2.pushable( 0 );
165
/*	$sec_2.notsolid();
166
	$sec_2.hide();*/
167
	//$sec_2.giveactorweapon( "actorweapons/fed-compressionrifle.tik", 1.0 );
168
	//$sec_2.useactorweapon( "CompressionRifle" );
169
	$sec_2.setgroupid ( 668 );
170
 
171
	$sec_3.ai_off();
172
	$sec_3.pushable( 0 );
173
/*	$sec_3.notsolid();
174
	$sec_3.hide();*/
175
	//$sec_3.giveactorweapon( "actorweapons/fed-compressionrifle.tik", 1.0 );
176
	//$sec_3.useactorweapon( "CompressionRifle" );
177
	$sec_3.anim( "crouch_idle" );
178
	$sec_3.setgroupid ( 668 );
179
 
180
	AIHideGroup(668);
181
 
182
//--misc
183
	$illia_shuttle.blink( 0 );
184
 
185
	$kraftfeld.hide();
186
 
187
	$security.nottriggerable();
188
	$trigger_open.nottriggerable();
189
	$away_trigger.nottriggerable();
190
 
191
	globalCommon_SpawnScriptModel( "vehicle/e-shuttle-ext.tik", "dallas_shuttle1", '-2200 596 60', 0 );
192
	$dallas_shuttle1.scale( .01 );
193
 
194
	globalCommon_SpawnScriptModel( "vehicle/e-shuttle-door.tik", "dallas_shuttle2", '-2200 596 60', 0 );
195
	$dallas_shuttle2.scale( .01 );
196
 
197
	$dallas_shuttle1.bind( $dallas_origin );
198
	$dallas_shuttle2.bind( $dallas_origin );
199
 
200
	$atlantic_a.bind( $atlantic_out_origin );
201
	$atlantic_b.bind( $atlantic_out_origin );
202
 
203
	$shuttle_warp.hide();
204
 
205
	wait( .1 );
206
	$sec_2.anim( "idle_weapon_legs" );
207
 
208
//--Maschinenraumtür
209
	$engdoor3.time( .1 );
210
	wait( .1 );
211
	$engdoor3.moveUp( 170 );
212
 
213
	$movewall.bind( $bay_move_origin );
214
}
215
 
216
///////////////////////////////////////////////////////////////////////////////
217
/////////////////////////////////////Intro/////////////////////////////////////
218
///////////////////////////////////////////////////////////////////////////////
219
 
220
 
221
void first_shot()
222
{
223
//--Camera fades in, Illia beams in, walks to console
224
	skipthread ( "finish_introcin" );
225
	$cam1.fov( 60 );
226
	$cam1.follow( $map5_shuttle_cam1d );
227
	$cam1.cut();
228
	wait( .1 );
229
	cuecamera( $cam1 );
230
	wait( .5 );
231
	cam_fadein( 3, 0, 0, 0, 1, 0 );
232
 
233
	wait( 1 );
234
	$illia_shuttle.show();
235
	$illia_shuttle.displayEffect( "TransportIn", "FederationNoAnim" );
236
	wait( 3 );
237
	$illia_shuttle.blink( 1 );
238
	wait( 1 );
239
	$illia_shuttle.headWatchTarget( "illia_look_first", 7 );
240
	wait( 1 );
241
	$illia_shuttle.headWatchTarget( "illia_look_second", 7 );
242
	$cam2.fov( 60 );
243
	$cam2.follow( $map5_shuttle_cam1 );
244
	$cam2.cut();
245
	wait( .1 );
246
	cuecamera( $cam2 );
247
 
248
	wait( 2 );
249
	$illia_shuttle.walkto( "$walk1", "walk" );
250
	wait( .5 );
251
	$illia_shuttle.headWatchTarget( "none", 7 );
252
	waitfor( $illia_shuttle );
253
	$illia_shuttle.walkto( "$walk2", "walk" );
254
	waitfor( $illia_shuttle );
255
	$illia_shuttle.turntoangle( 225 );
256
	waitfor( $illia_shuttle );
257
	$illia_shuttle.anim( "ent-curvedconsole-gesture" );
258
	wait( 2 );
259
	$illia_shuttle.anim( "idle" );
260
	wait( 1 );
261
	$illia_shuttle.playdialog("localization/sound/dialog/map05/illia/damn.mp3", 1, 10000, 0);
262
	waitfordialog( $illia_shuttle );
263
	cam_fadeout( 1.5, 0, 0, 0, 1, 0 );
264
	wait( 2 );
265
 
266
//--Camera cuts to imprisoned Illia
267
	$cam3.fov( 60 );
268
	$cam3.follow( $map5_p_illia1 );
269
	$cam3.cut();
270
	wait( .1 );
271
	cuecamera( $cam3 );
272
	cam_fadein( 1.5, 0, 0, 0, 1, 0 );
273
 
274
	wait( 2 );
275
	$illia_prisoner.playdialog("localization/sound/dialog/map05/illia/ihadto.mp3", 1, 10000, 0);
276
	waitfordialog( $illia_prisoner );
277
	wait( .5 );
278
	$illia_prisoner.playdialog("localization/sound/dialog/map05/illia/maincontrol.mp3", 1, 10000, 0);
279
	waitfordialog( $illia_prisoner );
280
//	wait( 1 );
281
	cam_fadeout( 1.5, 0, 0, 0, 1, 0 );
282
	wait( 2 );
283
	cam_fadein( 1.5, 0, 0, 0, 1, 0 );
284
 
285
//--camera is in shuttle, Illia exits
286
	$cam2.fov( 60 );
287
	$cam2.follow( $map5_shuttle_cam2 );
288
	$cam2.cut();
289
	wait( .1 );
290
	cuecamera( $cam2 );
291
 
292
	$illia_shuttle.walkto( "$walk1", "walk" );
293
	waitfor( $illia_shuttle );
294
	$illia_shuttle.walkto( "$w1", "walk" );
295
	wait( 1 );
296
	///////////////////
297
	//1. Tür geht auf//
298
	///////////////////
299
	$shuttle_stay_door1.anim( "opening" );
300
	$shuttle_stay_door1.playsound( "sound/doors/enterprise_door1.wav", 1 ,800 );
301
	waitforanimation( $shuttle_stay_door1, "opening" );
302
	$shuttle_stay_door1.anim( "open_idle" );
303
 
304
//	$shuttle_stay_door1.time( 1 );
305
//	$shuttle_stay_door1.moveWest( 38 );
306
//	$shuttle_stay_door1.moveNorth( 38 );
307
 
308
	waitfor( $illia_shuttle );
309
	$illia_shuttle.walkto( "$w2", "walk" );
310
	waitfor( $illia_shuttle );
311
	$illia_shuttle.walkto( "$w3", "walk" );
312
	//////////////////
313
	//1. Tür geht zu//
314
	//////////////////
315
	//$shuttle_stay_door1.anim( "closing" );
316
	//$shuttle_stay_door1.playsound( "sound/doors/enterprise_door1.wav", 1 ,800 );
317
	//waitforanimation( $shuttle_stay_door1, "closing" );
318
	//$shuttle_stay_door1.anim( "closed" );
319
 
320
//	$shuttle_stay_door1.time( 1 );
321
//	$shuttle_stay_door1.moveEast( 38 );
322
//	$shuttle_stay_door1.moveSouth( 38 );
323
	waitfor( $illia_shuttle );
324
	///////////////////
325
	//2. door opens //
326
	///////////////////
327
	$shuttle_stay_door2.anim( "opening" );
328
	$shuttle_stay_door2.playsound( "sound/doors/enterprise_door1.wav", 1 ,800 );	waitforanimation( $shuttle_stay_door2, "opening" );
329
	$shuttle_stay_door2.anim( "open_idle" );
330
 
331
//	$shuttle_stay_door2.time( 1 );
332
//	$shuttle_stay_door2.moveWest( 44 );
333
//	$shuttle_stay_door2.moveNorth( 44 );
334
 
335
	$illia_shuttle.walkto( "$w4", "walk" );
336
 
337
	$cam3.fov( 60 );
338
	$cam3.follow( $map5_shuttle_cam4 );
339
	$cam3.cut();
340
	wait( .1 );
341
	cuecamera( $cam3 );
342
 
343
	waitfor( $illia_shuttle );
344
	//////////////////
345
	//2. Tür geht zu//
346
	//////////////////
347
	//$shuttle_stay_door2.anim( "closing" );
348
	//$shuttle_stay_door2.playsound( "sound/doors/enterprise_door1.wav", 1 ,800 );
349
	//waitforanimation( $shuttle_stay_door2, "closing" );
350
	//$shuttle_stay_door2.anim( "closed" );
351
 
352
//	$shuttle_stay_door2.time( 1 );
353
//	$shuttle_stay_door2.moveEast( 44 );
354
//	$shuttle_stay_door2.moveSouth( 44 );
355
 
356
	$illia_shuttle.walkto( "$w5", "walk" );
357
	waitfor( $illia_shuttle );
358
 
359
	thread finish_introcin();
360
 
361
}
362
 
363
 
364
void finish_introcin()
365
{
366
 
367
   	$ramp_blocker.solid();
368
	$illia_shuttle.warpto( "$w5" );
369
	killthread("first_shot");
370
	$illia_shuttle.hide();
371
//--Cinematic beenden
372
	clearletterbox( 0.1 );
373
	noncinematic();
374
	$player.solid();
375
	$player.show();
376
	releaseplayer();
377
	cueplayer();
378
	//sec_shoot();
379
 
380
}
381
////////////////////////////////////////////////////////////////////////////
382
///////////After the player has maniplulated the main console///////////////
383
/////player has to jump of the railing /////////////////////////////////////
384
////////////////////////////////////////////////////////////////////////////
385
 
386
void bay_sec_beamin()
387
{
388
	skipthread ( "finish_beamincin" );
389
	$player.notsolid();
390
	$player.hide();
391
	letterbox( .1 );
392
	freezeplayer();
393
	cinematic();
394
	$ceilling_illia.turntoangle( 180 );
395
 
396
	$ceilling_illia.show();
397
	$cam1.fov( 60 );
398
	$cam1.follow( $map5_shuttle_door_close );
399
	$cam1.cut();
400
	wait( .1 );
401
	cuecamera( $cam1 );
402
 
403
	wait( 1 );
404
	//--Shuttle sschließt die Türen
405
   	$ramp_blocker.solid();
406
	$shuttle_stay_door.anim( "closing" );
407
	waitforanimation( $shuttle_stay_door, "closing" );
408
	$shuttle_stay_door.anim( "closed" );
409
	wait( 1 );
410
	$kraftfeld.show();
411
	$kraftfeld.playsound( "sound/ships/borg/borg_forcefield_on.wav", 1, 1, 11111 );
412
	$kraftfeld.loopsound( "sound/ships/enterprise/ent_forcefield.wav", .7, 30 );
413
	triggerentity( $kraftfeld_sound );
414
	wait( .4 );
415
 
416
	$rechte_door.time( 5.2 );
417
	wait( .1 );
418
	$rechte_door.moveUp( 300 );
419
	$rechte_door.loopsound( "sound/doors/airlock_open01.wav", 1 ,1024 );
420
 
421
	wait( 5.2 );
422
	$rechte_door.stoploopsound();
423
	$rechte_door.playsound( "sound/doors/airlock_close01.wav", 10 ,1 ,1024 );
424
 
425
	wait( 3.8 );
426
 
427
/*	$sec_1.solid();
428
	$sec_2.solid();
429
	$sec_3.solid();
430
	wait(1);*/
431
 
432
 
433
	$cam2.fov( 60 );
434
	$cam2.follow( $map5_jim_beamin );
435
	$cam2.cut();
436
	wait( .1 );
437
	cuecamera( $cam2 );
438
 
439
	$ceilling_illia.playdialog("localization/sound/dialog/map05/illia/goodbye.mp3", 1, 10000, 0);
440
	waitfordialog( $ceilling_illia );
441
 
442
	wait( 2 );
443
/*	$sec_1.displayEffect( "TransportIn", "FederationNoAnim" );
444
	$sec_2.displayEffect( "TransportIn", "FederationNoAnim" );
445
	$sec_3.displayEffect( "TransportIn", "FederationNoAnim" );
446
	wait( 2 );*/
447
 
448
	AIShowGroup (668, "Federation");
449
	$sec_1.headWatchTarget("player",7);
450
	$sec_2.headWatchTarget("player",7);
451
	$sec_3.headWatchTarget("player",7);
452
	$sec_1.ai_off();
453
	$sec_2.ai_off();
454
	$sec_3.ai_off();
455
	$sec_1.anim( "compressionrifle_aim" );
456
	$sec_2.anim( "compressionrifle_aim" );
457
	$sec_3.anim( "compressionrifle_aim" );
458
 
459
	$sec_2.playdialog( "localization/sound/dialog/map05/lee/donotmove.mp3", 1, 10000, 0);
460
	waitfordialog( $sec_2 );
461
	$ceilling_illia.turntoangle( 270 );
462
	wait( .5 );
463
	$sec_2.playdialog( "localization/sound/dialog/map05/lee/gameover.mp3", 1, 10000, 0);
464
	waitfordialog( $sec_2 );
465
	wait( 1 );
466
	$ceilling_illia.hide();
467
 
468
	//--End cinematic
469
	forcemusic( "action" );
470
	clearletterbox( 0.1 );
471
	noncinematic();
472
	$player.solid();
473
	$player.show();
474
	releaseplayer();
475
	cueplayer();
476
	$player.playerviewangles( '0 270 0' );
477
 
478
//	$security_beam.nottriggerable();
479
	$security.triggerable();
480
}
481
 
482
void sec_shoot()
483
{
484
//	centerprint("Sicherheit fängt an zu schießen!");
485
 
486
	$sec_1.turntoangle( 180 );
487
	$sec_2.walkto( "$secnode1", "run" );
488
	$sec_3.walkto( "$secnode2", "run" );
489
	waitfor( $sec_3 );
490
	$sec_1.anim( "idle_weapon_legs" );
491
	$sec_2.turntoangle( 180 );
492
	$sec_3.walkto( "$secnode3", "run" );
493
	waitfor( $sec_3 );
494
	$sec_3.turntoangle( 180 );
495
	waitfor( $sec_3 );
496
	$sec_3.anim( "idle_weapon_legs" );
497
	wait( .7 );
498
	$sec_2.anim( "idle_weapon_legs" );
499
/*	$sec_1.attackplayer();
500
	$sec_2.attackplayer();
501
	$sec_3.attackplayer();*/
502
 
503
//	AIShowGroup(668, "Federation");
504
 
505
	CommandToGroup ( 668 , "groupactortype" , "enemy" , "");
506
	CommandToGroup ( 668 , "visiondistance" , "40000" , "" );
507
	CommandToGroup ( 668 , "fov" , "360" , "" );
508
	CommandToGroup ( 668 , "attack" , "$player" , "" );
509
 
510
	$sec_1.ai_on();
511
	$sec_2.ai_on();
512
	$sec_3.ai_on();
513
 
514
	$trigger_open.triggerable();
890 avenger 515
	if(doesEntityExist($security)){
516
		$security.nottriggerable();
517
	}
885 lars 518
}
519
 
520
void shuttle_open()
521
{
522
   	$ramp_blocker.notsolid();
523
	$shuttle_stay_door.anim( "opening" );
524
	waitforanimation( $shuttle_stay_door, "opening" );
525
	$shuttle_stay_door.anim( "open_idle" );
526
 
527
	$away_trigger.triggerable();
528
	$trigger_open.nottriggerable();
529
}
530
 
531
void shuttle_away()
532
{
533
//--Begin cinematic!
534
	skipthread ( "finish_awaycin" );
535
	$player.notsolid();
536
	$player.hide();
537
	letterbox( .1 );
538
	freezeplayer();
539
	cinematic();
540
 
541
	$illia_shuttle.show();
542
	$cam1.fov( 60 );
543
	$cam1.follow( $away_cam1, $illia_shuttle );
544
	$cam1.cut();
545
	wait( .1 );
546
	cuecamera( $cam1 );
547
 
548
	$illia_shuttle.walkto( "$w4", "run" );
549
	waitfor( $illia_shuttle );
550
 
551
	$shuttle_stay_door.anim( "closing" );
552
	waitforanimation( $shuttle_stay_door, "closing" );
553
	$shuttle_stay_door.anim( "closed" );
554
 
555
	$illia_shuttle.hide();
556
 
557
	$shuttle_stay_door2.hide();
558
	$shuttle_stay_door1.hide();
559
	$shuttle_stay_door.hide();
560
	$shuttle_stay.hide();
561
	$shuttle_fly_away_door.show();
562
	$shuttle_fly_away_ext.show();
563
 
564
	$cam2.fov( 60 );
565
	$cam2.follow( $door_open_cam1 );
566
	$cam2.cut();
567
	wait( .1 );
568
	cuecamera( $cam2 );
569
 
570
	$shuttle_origin.followpath($shuttle_path);
571
	wait( 4.5 );
572
	$shuttle_origin.playsound( "sound/vehicles/shuttlecraft/shuttle_takeoff.wav", 0, 4 );
573
	wait( 16 );
574
	$rechte_door.time( 5.2 );
575
	$rechte_door.moveDown( 300 );
576
	$rechte_door.loopsound( "sound/doors/airlock_open01.wav", 1 ,1024 );
577
	wait( 2);
578
 
579
	wait( 4 );
580
 
581
	$cam2.fov( 20 );
582
	$cam2.follow( $map5_cam_shuttle );
583
	$cam2.cut();
584
	wait( .1 );
585
	cuecamera( $cam2 );
586
	$sky_ship.hide();
587
 
588
	wait( 1.2 );
589
	$rechte_door.stoploopsound();
590
	$rechte_door.playsound( "sound/doors/airlock_close01.wav", 10 ,.5 ,1024 );
591
	wait( .3 );
592
	$dallas_origin.followpath( $map5_shuttle_path );
593
	//wait( 6.5 );
594
	wait( 4 );
595
 
596
	$atlantic_out_origin.followpath( $atlantic_out_path );
597
 
598
	$cam3.fov( 55 );
599
	$cam3.follow( $atlantic_out_cam1, $atlantic_out_origin );
600
	$cam3.cut();
601
	wait( .1 );
602
	cuecamera( $cam3 );
603
	$kraftfeld.hide();
604
 
605
	wait( 8 );
606
 
607
	$cam1.fov( 55 );
608
	$cam1.follow( $atlantic_out_cam2, $atlantic_out_origin );
609
	$cam1.cut();
610
	wait( .1 );
611
	cuecamera( $cam1 );
612
	wait( 17 );
613
	/////////////////////////
614
	//Moya in engineering//
615
	/////////////////////////
616
	$cam3.fov( 75 );
617
	$cam3.follow( $engine_cam1 );
618
	$cam3.cut();
619
	wait( .1 );
620
	cuecamera( $cam3 );
621
 
622
	wait( 1 );
623
	thread sparks();
624
	wait(.1);
625
        $world.playsound( "sound/explo_large_01.wav",3,1,10000);
626
	triggerentity( $big_boom_engineering );
627
	wait(.1);
628
 
629
	$player.earthquake( 2.2, 1 );
630
 
631
	triggerentity( $eng_explosion );
632
	wait( 2 );
633
	thread redalert();
634
	$engdoor3.time( 6 );
635
	wait( .1 );
636
	$engdoor3.moveDown( 170 );
637
	wait( 1 );
638
 
639
	$moya.anim( "tap_comm" );//communicator
640
	waitforanimation( $moya, "tap_comm" );
641
	$moya.anim( "idle" );
642
	wait(1);
643
	$moya.playdialog( "localization/sound/dialog/map05/moya/bridge.mp3", 1, 10000, 0);
644
	waitfordialog( $moya );
645
	$moya.playdialog( "localization/sound/dialog/map05/moya/warpcore.mp3", 1, 10000, 0);
646
	waitfordialog( $moya );
647
	wait( .4 );
648
	$moya.playdialog( "localization/sound/dialog/map05/moya/deadinspace.mp3", 1, 10000, 0);
649
	waitfordialog( $moya );
650
	wait( 2 );
651
	triggerentity( $big_boom_engineering );
652
	thread bill_ex();
653
	wait( 2.5 );
654
	killthread( "sparks" );
655
	$cam2.fov( 90 );
656
	$cam2.follow( $map5_atlantic_last_shot );
657
	$cam2.cut();
658
	wait( .1 );
659
	cuecamera( $cam2 );
660
	wait( 2 );
661
	cam_fadeout( 10, 0, 0, 0, 1, 0 );
662
	wait( 4 );
663
//	stuffcmd( "showmenu continued\n" );
664
//	wait( 4 );
665
//	stuffcmd ( "popmenu 0\n" );
666
 
667
	wait( 4 );
668
	finish_awaycin();
669
}
670
 
671
void finish_awaycin()
672
{
673
//--end cinematic
674
	killthread("shuttle_away");
675
	clearletterbox( 0.1 );
676
	noncinematic();
677
	$player.solid();
678
	$player.show();
679
	releaseplayer();
680
	cueplayer();
681
 
682
	stuffcmd ("map map6");
683
 
684
	cam_fadein( 1.5, 0, 0, 0, 1, 0 );
685
}
686
 
687
//////////////////////////
688
//Explosions and sparks//
689
//////////////////////////
690
void shuttle_inside_sparks()
691
{
692
	$movewall.time( 15 );
693
	$sky_ship.time( 2.9 );
694
	wait( .1 );
695
	$movewall.moveEast( 1600 );
696
	$sky_ship.moveEast( 3 );
697
	$cam1.fov( 90 );
698
	$cam1.follow( $shuttle_inside_cam1 );
699
	$cam1.cut();
700
	wait( .1 );
701
	cuecamera( $cam1 );
702
	$player.earthquake( 1.2, 1 );
703
	triggerentity( $shuttle_inside_spark1 );
704
	triggerentity( $shuttle_inside_spark1_s );
705
	wait( .3 );
706
	triggerentity( $shuttle_inside_spark3 );
707
	triggerentity( $shuttle_inside_spark3_s );
708
	wait( .2 );
709
	triggerentity( $shuttle_inside_spark2 );
710
	triggerentity( $shuttle_inside_spark2_s );
711
	wait( .3 );
712
	triggerentity( $shuttle_inside_spark1 );
713
	triggerentity( $shuttle_inside_spark1_s );
714
	triggerentity( $shuttle_inside_spark3 );
715
	$sky_ship.time( .1 );
716
	wait( 2 );
717
	$sky_ship.moveWest( 3 );
718
	cuecamera( $cam2 );
719
 
720
}
721
 
722
void sparks()
723
{
724
	triggerentity( $sparks1 );
725
	$sparks1.playsound( "sound/impact/explosion/explo_shuttleint.wav" );
726
	wait( 1.1 );
727
	triggerentity( $sparks3 );
728
	$sparks3.playsound( "sound/impact/explosion/explo_shuttleint.wav" );
729
	wait( 2 );
730
	triggerentity( $sparks2 );
731
	$sparks2.playsound( "sound/impact/explosion/explo_shuttleint.wav" );
732
	wait( 1 );
733
	triggerentity( $sparks1 );
734
	$sparks1.playsound( "sound/impact/explosion/explo_shuttleint.wav" );
735
	triggerentity( $sparks3 );
736
	$sparks3.playsound( "sound/impact/explosion/explo_shuttleint.wav" );
737
	wait( 2 );
738
	thread sparks();
739
}
740
 
741
void redalert()
742
{
743
	$world.light_fade( "light_red", .65, .4 );
744
	triggerentity( $redalert_sound );
745
	wait( 1.5 );
746
	$world.light_fade( "light_red", .1, .8 );
747
	wait( 1 );
748
	thread redalert();
749
}
750
 
751
void shuttlesparks()
752
{
753
	$player.earthquake( .8, 2 );
754
	triggerentity( $shuttle_sparks );
755
	triggerentity( $fly_away_sparks_s );
756
	wait( .4 );
757
	triggerentity( $shuttle_sparks );
758
	triggerentity( $fly_away_sparks_s );
759
	wait( .4 );
760
	triggerentity( $shuttle_sparks );
761
	triggerentity( $fly_away_sparks_s );
762
	wait( .6 );
763
	triggerentity( $shuttle_sparks );
764
	triggerentity( $fly_away_sparks_s );
765
	wait( .1 );
766
	thread shuttle_inside_sparks();
767
}
768
 
769
void shuttle_goto_warp()
770
{
771
	$shuttle_warp.show();
772
	$shuttle_warp.followpath( $path_gowarp );
773
	wait( 2.6 );
774
	$shuttle_warp.playsound( "sound/ships/enterprise/ent_enter_warp.wav", 10 ,1 ,1024 );
775
	wait( 3.7 );
776
 
777
	$spawnWarpFlash.scale( .2 );
778
	$spawnWarpFlash.modelname( "models/fx/fx-warpflash-federation.tik" );
779
	$spawnWarpFlash.origin( $shuttle_warp.getOrigin() );
780
	wait( .05 );
781
 
782
	triggerEntity( $spawnWarpFlash );
783
	$shuttle_warp.hide();
784
}
785
 
786
void bill_ex()
787
{
788
	$bails0.turntoangle( 135 );
789
	wait( .1 );
790
	$bails0.anim( "cin-m6l0-engineering-bill" );
791
}
792
 
793
void closed_door_sound()
794
{
795
	$player.playsound( "sound/environment/computer/lcars_no.wav");
796
}