Subversion-Projekte sthq.gbs

Revision

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

Revision Autor Zeilennr. Zeile
520 lars 1
//--------------------------------------------------------------------------------------
2
//
3
//  A Gate Two Birds And The Beautiful Sky Level Script File
4
//
888 lars 5
//  Level:			map7
6
//  Script By:		Patrick "Nemo" Weiser
641 argyle 7
//  Geometry By:	TickNSwisted & Patrick "Nemo" Weiser & LTiefland
888 lars 8
//  Created on:		27.01.2004
520 lars 9
//
890 avenger 10
//  Last Edited by:	ltiefland
11
//  Last Edited on:	11/11/06
520 lars 12
//
13
//--------------------------------------------------------------------------------------
14
 
15
void main();
16
void init();
17
void shoot_disrupter(entity weapon_parm, entity origin_parm, entity target_parm);
18
void shoot_tal(entity weapon_parm, entity origin_parm, entity target_parm, string explosion_parm, entity other_entity);
19
void moveWarbird();
20
void intro();
641 argyle 21
void finish_intro();
520 lars 22
void firstShoot();
23
void romulancommander();
24
void attack_bridge();
25
void decloak_warbird();
26
void attack_outpost();
27
void bridge_endcinematic();
28
void loop_explosions_bridge();
29
void disrupter0();
30
void disrupter1();
31
void disrupter2();
32
void disrupter3();
33
 
34
void activate_trigger_count();
35
void collision_counter();
36
 
37
//Energieumleitung
38
void energyrouting_Used();
39
void energyrouting_Failed();
40
void energyrouting_Canceled();
41
void energyrouting_Solved();
42
 
43
void warbirds_boom();
44
 
572 TickNSwist 45
void hall_collapse();
549 TickNSwist 46
 
572 TickNSwist 47
 
520 lars 48
#include "maps/global_scripts/global_debugUtils.scr"
49
#include "maps/global_scripts/global_common.scr"
50
#include "maps/global_scripts/global_math.scr"
888 lars 51
#include "maps/global_scripts/global_playerLoadout.scr"
520 lars 52
#include "maps/global_scripts/global_acceleratedMovement.scr"
53
#include "maps/global_scripts/global_cinematicFX.scr"
54
#include "maps/global_scripts/global_tricorderBase.scr"
55
#include "maps/global_scripts/global_tricorderRoute.scr"
56
 
57
void main()
58
{
59
	cam_fadeout( .1, 0, 0, 0, 1, 0 );
60
//	$player.notsolid();
61
//	$player.hide();
62
	letterbox( .1 );
63
	freezeplayer();
64
	cinematic();
65
	soundtrack( "music/warbird1.mus" );
66
	musicvolume( 0.75, .1 );
67
	allowMusicDucking( 0 );
68
 
69
//--Kameras spawnen
70
	spawn( "Camera", "targetname", "cam1");
71
	spawn( "Camera", "targetname", "cam2");
72
	spawn( "Camera", "targetname", "cam3");
73
	spawn( "Camera", "targetname", "cam4");
74
 
75
//--Cams laden
76
/*	cam.load( "map7_cam1" );
77
	cam.load( "map7_rom1" );
78
	cam.load( "map7_rom2" );
79
	cam.load( "map7_cam2" );
80
	cam.load( "map7_cam3" );
81
	cam.load( "map7_p_illia1" );
82
	cam.load( "map7_illia_cam1" );
83
	cam.load( "map7_outpost_cam1" );*/
84
 
85
//--Energieumleitung
86
	$energyrouting.puzzleobject_itemtouse( "Tricorder" );
87
	$energyrouting.puzzleobject_itemusedthread( "energyrouting_Used" );
88
	$energyrouting.puzzleobject_solvedthread( "energyrouting_Solved" );
89
	$energyrouting.puzzleobject_failedthread( "energyrouting_Failed" );
90
	$energyrouting.puzzleobject_canceledthread( "energyrouting_Canceled" );
91
 
92
//--Erlaubt Kamera-Shakes
93
	$world.canShakeCamera( 1 );
94
 
641 argyle 95
	init();
520 lars 96
	thread intro();
97
}
98
 
641 argyle 99
void finish_intro()
100
{
101
	killthread("intro");
102
	$screen.hide();
103
	clearletterbox( .1 );
104
	noncinematic();
105
	releaseplayer();
106
	cueplayer();
107
	$illia.remove();
108
	wait(.1);
888 lars 109
	globalLoadout_GiveWeapon( WEAPON_TRICORDER_STX );
110
	globalLoadout_GiveWeapon( WEAPON_PHASER_STX );
111
	globalLoadout_GiveWeapon( WEAPON_ROMULAN_DISRUPTOR );
112
	globalLoadout_GiveWeapon( WEAPON_COMPRESSION_RIFLE );
113
	globalLoadout_GiveWeapon( WEAPON_BURST_RIFLE );
114
	globalLoadout_GiveWeapon( WEAPON_ASSAULT_SHOTGUN );
890 avenger 115
	//Chrissstrahl 2007.06.20 player isn't a actor!
116
	//$player.useActorWeapon( "TricorderSTX" );
641 argyle 117
 
118
	thread loop_explosions_bridge();
119
	thread collision_counter();
120
 
121
	//Make a new objective appear: get to the transporter and beam to the planet
122
	//Make the blip appear on your radar
890 avenger 123
	if(doesEntityExist($illias_transporter)){//Chrisstrahl 2007.06.20
124
		$illias_transporter_console.missionobjective( 1 );
125
	}
641 argyle 126
	//Make the mission objective appear
127
	$player.setobjectiveshow( "transportout", 1 );
128
}
129
 
520 lars 130
void init()
131
{
641 argyle 132
//--NPCs in game
520 lars 133
	$romulan.ai_off();
134
	$illia.ai_off();
135
	$illia.anim( "ent-library-seat-idle" );
136
	$illia.morph( "exp_Serious" );
137
	$illia.morph( "exp_Nervous" );
138
	$illia.removeactorweapon ( "CompressionRifle" );
139
	$illia_prisoner3.ai_off();
140
	$illia_prisoner3.removeactorweapon ( "CompressionRifle" );
141
	$illia_prisoner3.anim( "cin-m8_situp" );
142
	$chang.ai_off();
890 avenger 143
	if(doesEntityExist($guard1)){//Chrisstrahl 2007.06.20
144
		$guard1.ai_off();
145
		$guard1.hide();
146
		$guard1.notsolid();
147
	}
148
	if(doesEntityExist($guard2)){//Chrisstrahl 2007.06.20
149
		$guard2.ai_off();
150
		$guard2.hide();
151
	}
152
	$chang.ai_off();
520 lars 153
	$chang.hide();
154
	$chang.notsolid();
155
	$tebok2.ai_off();
554 TickNSwist 156
 
157
	//Added by TickNSwisted 29/08/2004
158
	$npcs_off.notsolid();
159
	$npcs_off.ai_off();
160
 
520 lars 161
 
162
	$beam_illia.ai_off();
163
	$beam_illia.morph( "exp_Relief" );
164
	$beam_illia.removeactorweapon ( "CompressionRifle" );
165
	$beam_illia.hide();
166
	$beam_illia.notsolid();
167
 
168
	$screen.show();
169
	$screen.solid();
170
	$screen.alpha( 1 );
171
 
172
	//Added by DrBob, 07/03/04
173
	$illia_plasmaleak.hide();
174
	$illia_flames.hide();
175
 
176
	//Add the objectives list
177
	$player.loadobjectives( "GBS7" );
178
 
641 argyle 179
//--Load models
520 lars 180
	spawn("script_object","targetname","fire1");wait(.1);
181
	$fire1.model( "models/projectile/projectile-photonball-voyager.tik" );
182
	$fire1.scale( .2 );
183
	$fire1.hide();
184
 
185
	spawn("script_object","targetname","fire2");wait(.1);
186
	$fire2.model( "models/projectile/projectile-photonball-voyager.tik" );
187
	$fire2.hide();
188
	$fire2.scale( .2 );
189
 
190
	$warp.scale( 0.8 );
191
	$warp.modelname( "models/fx/fx-warpflash-federation.tik" );
192
	$warp.origin( $warbird1.getOrigin() );
193
 
641 argyle 194
//--Binding ships, weapons etc
520 lars 195
	$fire_origin1.bind($warbird1_origin);
196
	$fire_origin2.bind($warbird1_origin);
197
	$warbird1.bind($warbird1_origin);
198
	$illia_plasmaleak.bind( $warbird1_origin );
199
	$illia_flames.bind( $warbird1_origin );
200
	$warbird1.hide();
201
	$warbird_talshiar.forcealpha( 1 );
202
	$warbird_talshiar.alpha( 0 );
203
	$warbird_talshiar.hide();
204
 
641 argyle 205
//--Romulan outpost + torpedos
520 lars 206
	globalCommon_SpawnScriptModel( "projectile/projectile-photonball-voyager.tik", "torp_0", '-872 1264 -8', 0 );
207
	globalCommon_SpawnScriptModel( "projectile/projectile-photonball-voyager.tik", "torp_1", '-872 1264 -8', 0 );
208
	globalCommon_SpawnScriptModel( "projectile/projectile-photonball-voyager.tik", "torp_2", '-872 1264 -8', 0 );
209
	globalCommon_SpawnScriptModel( "projectile/projectile-photonball-voyager.tik", "torp_3", '-872 1264 -8', 0 );
210
 
211
	$bigBang1.doexplosion( "fx/fx-explosion-crate-attrex-01.tik" );
212
	$bigBang3.doexplosion( "fx/fx-explosion-crate-romulan-01.tik" );
213
	$bigBang4.doexplosion( "fx/fx-explosion-crate-attrex-large.tik" );
214
	$bigBang5.doexplosion( "fx/fx-explosion-crate-romulan-03.tik" );
215
 
216
	$bigBang2.doexplosion( "fx/fx-explosion-crate-attrex-01.tik" );
217
	$bigBang6.doexplosion( "fx/fx-explosion-crate-romulan-03.tik" );
218
	$bigBang7.doexplosion( "fx/fx-explosion-crate-klingon-02.tik" );
219
 
220
	$bigBang8.doexplosion( "fx/fx-explosion-crate-klingon-03.tik" );
221
	$bigBang9.doexplosion( "fx/fx-explosion-crate-attrex-large.tik" );
222
	$bigBang10.doexplosion( "fx/fx-explosion-crate-romulan-01.tik" );
223
 
224
	$bigBang11.doexplosion( "fx/fx-explosion-crate-romulan-03.tik" );
225
	$bigBang12.doexplosion( "fx/fx-explosion-crate-klingon-03.tik" );
226
	$bigBang13.doexplosion( "fx/fx-explosion-crate-attrex-large.tik" );
227
 
228
//--Collision-counter
890 avenger 229
	if(doesEntityExist($stopCounter)){
230
		$stopCounter.nottriggerable();
231
	}
520 lars 232
	$chang.updatebosshealth( 1, 1 );
233
	$chang.health( 200 );
234
	$chang.maxhealth( 201 );
235
	$chang.maxbosshealth( 200 );
236
//--Sonstiges
237
	$sparks.hide();
238
	$planet.hide();
239
 
240
	$cam1.follow($map7_cam1);
241
	$cam1.cut();
242
	wait( .1 );
243
	cuecamera($cam1);
244
}
245
 
246
void shoot_disrupter(entity weapon_parm, entity origin_parm, entity target_parm)
247
{
248
	weapon_parm.origin(origin_parm.getorigin() );
249
	weapon_parm.show();
250
	weapon_parm.playsound("sound/weapons/radgun/rad_fire.wav");
251
	weapon_parm.time(3);
252
	weapon_parm.moveto(target_parm);
253
	wait(1);
254
	weapon_parm.scale(0.000000001);
255
	wait(2.1);
256
	weapon_parm.hide();
257
}
258
 
259
void shoot_tal(entity weapon_parm, entity origin_parm, entity target_parm, string explosion_parm, entity other_entity)
260
{
261
	weapon_parm.origin(origin_parm.getorigin() );
262
	weapon_parm.show();
263
	weapon_parm.playsound("sound/weapons/radgun/rad_fire.wav");
264
	weapon_parm.time(1.5);
265
	weapon_parm.moveto(target_parm);
266
	wait(.5);
267
	weapon_parm.scale(0.00001);
268
	wait(1);
269
	trigger( explosion_parm);
270
	wait(.1);
271
	other_entity.show();
272
	weapon_parm.remove();
273
}
274
 
275
 
276
void moveWarbird()
277
{
278
	triggerEntity( $warp );
279
	$bird1_origin1.followpath($bird1_path1);
280
	$cam1_origin1.playsound( "sound/ent_getoutof_warp.wav", 0, 4, 20000 );
281
}
282
 
283
void intro()
284
{
641 argyle 285
	skipthread("finish_intro");
520 lars 286
	cam_fadein( 4, 0, 0, 0, 1, 0 );
287
	wait(3);
288
	//Menu below modified by DrBob on 07/03/04 to hide mouse
289
	stuffcmd( "showmenu oberth_system\n" );
290
	wait(4);
291
	stuffcmd ( "popmenu 0\n" );
292
	wait( 2 );
293
	triggerEntity( $warp );
294
	$warbird1_origin.followpath($warbird_path1);
295
	//Modified on 07/03/04 by DrBob to add warpin sound.
296
	$warbird1_origin.playsound( "sound/ent_getoutof_warp.wav", 0, 4, 20000 );
297
	$warbird1.show();
298
	wait( 4 );
299
	$cam2.follow($introcam_1);
300
	$cam2.cut();
301
	wait(.1);
302
	cuecamera($cam2);
303
	wait( 4 );
641 argyle 304
	romulancommander();
520 lars 305
}
306
 
307
void firstShoot()
308
{
309
	$cam4.follow($map7_cam2);
310
	$cam4.cut();
311
	wait( .1 );
312
	cuecamera($cam4);
313
    	wait(.5);
314
    	thread shoot_disrupter($fire1, $fire_origin1, $fire);
315
	wait(1);
316
	thread shoot_disrupter($fire2, $fire_origin2, $fire);
317
	wait( 2 );
641 argyle 318
	attack_outpost();
520 lars 319
}
320
 
321
void romulancommander()
322
{
323
	$cam3.follow( $map7_rom1 );
324
	$cam3.cut();
325
	wait(.1);
326
	cuecamera($cam3);
327
	$screen.show();
328
 	$romulan.playdialog("localization/sound/dialog/map07/Tebok/approaching.mp3",1,10000,0);
329
 	waitfordialog($romulan);
330
 	$romulan.playdialog("localization/sound/dialog/map07/Tebok/military.mp3",1,10000,0);
331
 	waitfordialog($romulan);
332
 	$romulan.playdialog("localization/sound/dialog/map07/Tebok/turnyourship.mp3",1,10000,0);
333
	waitfordialog($romulan);
334
	$screen.hide();
335
	wait( 1.5 );
336
	$cam2.follow( $map7_illia_cam1 );
337
	$cam2.cut();
338
	wait(.1);
339
	cuecamera($cam2);
340
	wait( .4 );
341
	$illia.morph( "exp_Surprise" );
342
	$illia.playdialog("localization/sound/dialog/map07/illia/heisangry.mp3", 1, 10000, 0);
343
	wait(1);
344
	$illia.anim( "ent-frontchair-gesture1" );
345
	wait( 1.5 );
346
	$illia.unmorph( "exp_Surprise" );
641 argyle 347
	firstShoot();
520 lars 348
}
349
 
350
void attack_bridge()
351
{
352
	$cam4.follow( $map7_rom2 );
353
	$cam4.cut();
354
	wait(.1);
355
	cuecamera($cam4);
356
	cam_fadein( 1.5, 0, 0, 0, 1, 0 );
357
	wait( .5 );
358
	$player.earthquake( 2, 2 );
359
	triggerentity( $exp_center );
360
	$exp_center.playsound( "sound/impact/explosion/expl_distnode1.wav", 0, 4, 20000 );
361
	$sparks.show();
362
	triggerentity( $exp_behind );
363
	wait( 1.5 );
364
	triggerentity( $exp_behind );
365
	wait( .2 );
366
	triggerentity( $exp_screen2 );
367
	$player.earthquake( 1, 3.5 );
368
	wait( .7 );
369
	$cam4.earthquake( 1, 1 );
370
	wait( 1 );
371
	triggerentity( $exp_screen2 );
372
	triggerentity( $exp_screen1 );
572 TickNSwist 373
	wait( .5 );
520 lars 374
	cam_fadeout( 2, 0, 0, 0, 1, 0 );
572 TickNSwist 375
	wait( .2 );
520 lars 376
	triggerentity( $exp_2 );
572 TickNSwist 377
	wait( .2 );
520 lars 378
	cam_fadein( 1, 0, 0, 0, 1, 0 );
572 TickNSwist 379
	triggerentity( $exp_screen_trans );
520 lars 380
	cuecamera($cam2);
381
	$illia_prisoner3.playdialog("localization/sound/dialog/map07/illia/warbirdof.mp3", 1, 10000, 0);
382
	waitfordialog( $illia_prisoner3 );
383
	$illia_prisoner3.playdialog("localization/sound/dialog/map07/illia/collision.mp3", 1, 1000, 0);
384
	waitfordialog( $illia_prisoner3 );
385
 
386
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
387
	wait( 2 );
641 argyle 388
	bridge_endcinematic();
520 lars 389
}
390
 
391
void decloak_warbird()
392
{
393
	cam_fadein( 1, 0, 0, 0, 1, 0 );
394
	$cam2.fov( 85 );
395
	$cam2.follow( $map7_p_illia1 );
396
	$cam2.cut();
397
	wait(.1);
398
	cuecamera($cam2);
399
	wait( 2.1 );
400
	$illia_prisoner3.playdialog("localization/sound/dialog/map07/illia/itwascleartome.mp3", 1, 10000, 0);
401
	waitfordialog( $illia_prisoner3 );
402
	$illia_prisoner3.playdialog("localization/sound/dialog/map07/illia/minutesof.mp3", 1, 10000, 0);
403
	waitfordialog( $illia_prisoner3 );
404
	wait( 1.3 );
405
	$illia_prisoner3.playdialog("localization/sound/dialog/map07/illia/notgoingtoget.mp3", 1, 10000, 0);
406
	waitfordialog( $illia_prisoner3 );
407
	$torp_1.hide();
408
	$torp_2.hide();
409
	wait( .2 );
410
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
411
	wait( 2 );
412
	$cam3.follow( $introcam_2 );
413
	$cam3.cut();
414
	wait( .1 );
415
	cuecamera($cam3);
416
	cam_fadein( 2, 0, 0, 0, 1, 0 );
417
	wait( 1.7 );
418
 
419
	//Decloak the ship
420
	$warbird_talshiar.playsound( "sound/cloak.wav", 0, 4, 20000 );
421
	$warbird_talshiar.fadein( 2, 1 );
422
	$warbird_talshiar.show();
423
	wait(2.5);
424
	$cam1.follow( $map7_cam3 );
425
	$cam1.cut();
426
	wait( .1 );
427
	cuecamera( $cam1 );
428
 
429
	wait( .5 );
430
    	thread shoot_tal($torp_1, $weapon_tal_origin, $weapon_tal_origin1, "$explosion", $illia_plasmaleak );
431
	wait( 1 );
432
    	thread shoot_tal($torp_2, $weapon_tal_origin, $weapon_tal_origin1, "$explosion2", $illia_flames);
433
	wait( 3 );
434
 
435
	cam_fadeout( 2, 0, 0, 0, 1, 0 );
436
	wait( 2 );
437
	cam_fadein( 1, 0, 0, 0, 1, 0 );
438
 
439
    	cuecamera($cam2);
440
	$illia_prisoner3.playdialog("localization/sound/dialog/map07/illia/shouldnot.mp3", 1, 10000, 0);
441
	waitfordialog( $illia_prisoner3 );
442
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
443
	wait( 1.5 );
641 argyle 444
	attack_bridge();
520 lars 445
}
446
 
447
void attack_outpost()
448
{
449
	$cam1.follow( $map7_outpost_cam1 );
450
	$cam1.cut();
451
	wait(.1);
452
 
453
	cuecamera ($cam1);
454
	wait(.7);
455
	thread disrupter0();
456
	wait(1);
457
	thread disrupter1();
458
	wait(1);
459
	thread disrupter2();
460
	wait(1);
461
	thread disrupter3();
462
	wait( 4 );
641 argyle 463
	decloak_warbird();
520 lars 464
}
465
 
466
void bridge_endcinematic()
467
{
468
	$cam4.follow( $map7_rom2 );
469
	$cam4.cut();
470
	wait(.1);
471
	cam_fadein( 2, 0, 0, 0, 1, 0 );
472
	cuecamera($cam4);
473
 
474
	wait( .5 );
475
	$player.earthquake( 2, 2 );
476
	triggerentity( $exp_screen2 );
477
	wait( 1);
478
	$player.earthquake( 2.2, 1 );
479
	triggerentity( $exp_screen1 );
480
	wait( .4 );
481
	$player.earthquake( 1.5, 1 );
482
	triggerentity( $exp_behind );
483
	triggerentity( $exp_screen2 );
484
	wait( .6 );
485
	triggerentity( $exp_screen1 );
486
	$player.earthquake( 1, .4 );
487
	wait( .5 );
488
	triggerentity( $exp_behind );
572 TickNSwist 489
	wait(.3);
490
	triggerentity( $exp_screen_trans );
641 argyle 491
	thread finish_intro();
520 lars 492
}
493
 
494
void loop_explosions_bridge()
495
{
496
	triggerentity( $exp_center );
497
	$exp_center.playsound( "sound/impact/explosion/expl_distnode1.wav", 0, 4, 20000 );
498
	$player.earthquake( .5, 1 );
499
	wait( 2 );
500
	triggerentity( $exp_screen1 );
501
	wait( 2.5 );
502
	triggerentity( $exp_Screen2 );
503
	triggerentity( $exp_behind );
504
	wait( 2 );
505
	$player.earthquake( .5, 1 );
506
	triggerentity( $exp_screen1 );
507
	wait( 2 );
508
	triggerentity( $exp_behind );
509
	wait( 1 );
510
	triggerentity( $exp_screen2 );
511
	triggerentity( $exp_center );
512
	$exp_center.playsound( "sound/impact/explosion/expl_drullship.wav", 0, 4, 20000 );
513
	$player.earthquake( 1, 2 );
514
	wait( 2 );
515
	triggerentity( $exp_behind );
516
	wait( 1 );
517
	thread loop_explosions_bridge();
518
}
519
 
520
void disrupter0()
521
{
522
	$torp_0.followpath( $proj0_path);
523
	wait(2);
524
 
525
	trigger( "$bigBang11" );
526
	$bigBang11.playsound( "sound/impact/explosion/explo_disruptor.wav", 0, 4, 20000 );
527
	wait(.1);
528
	trigger( "$bigBang12" );
529
	wait(.1);
530
	trigger( "$bigBang13" );
531
	wait(.1);
532
}
533
 
534
void disrupter1()
535
{
536
	$torp_1.followpath( $proj1_path);
537
	wait(1.7);
538
	$player.earthquake( 1, 0.3 );
539
	trigger( "$bigBang1" );
540
	$bigBang1.playsound( "sound/impact/explosion/expl_towerfall.wav", 0, 4, 20000 );
541
	wait(.1);
542
	trigger( "$bigBang3" );
543
	wait(.1);
544
	trigger( "$bigBang4" );
545
	wait(.1);
546
	trigger( "$bigBang5" );
547
	$torp_1.trigger("debris");
548
	wait(2);
549
	$debris.hide();
550
}
551
 
552
void disrupter2()
553
{
554
	$torp_2.followpath( $proj2_path);
555
 
556
	wait(2);
557
	$player.earthquake( 1, 0.5 );
558
	trigger( "$bigBang2" );
559
	$bigBang2.playsound( "sound/impact/explosion/explo_shuttleint.wav", 0, 4, 20000 );
560
	wait(.1);
561
	trigger( "$bigBang6" );
562
	wait(.1);
563
	trigger( "$bigBang7" );
564
	//$proj1_origin.trigger("debris2");
565
	trigger( "$debris2");
566
}
567
 
568
void disrupter3()
569
{
570
	$torp_3.followpath( $proj3_path);
571
	wait(2);
572
	$player.earthquake( 1, 1 );
573
 
574
	trigger( "$bigBang8" );
575
	$bigBang8.playsound( "sound/impact/explosion/explo_wall1.wav", 0, 4, 20000 );
576
	cam_fadeout( 1.5, 1, 1, 1, 1, 0 );
577
	wait(.1);
578
	trigger( "$bigBang9" );
579
	wait(.1);
580
	trigger( "$bigBang10" );
581
	wait(.1);
582
	trigger( "$bigBang8" );
583
	wait(.1);
584
	trigger( "$bigBang9" );
585
	wait(.1);
586
	trigger( "$bigBang10" );
587
}
588
 
589
void activate_trigger_count()
590
{
591
	$stopCounter.triggerable();
592
}
593
 
594
void collision_counter()
595
{
596
///////////////////////////COLLSISION-COUNTER/////////////////////////////////////
641 argyle 597
//////////////////////////Time to collsision:////////////////////////////////////
598
//////////////////////////////60 SECONDS/////////////////////////////////////////
520 lars 599
	//
600
	//Note:  Um den Timer zu verändern, kann man zwei Werte verändern.
601
	//		 Der erste Wert ist dazu da, um festzulegen, wie wiel Schaden
602
	//		 verursacht wird. Der zweite Wert ist dazu da, um festzulegen
603
	//		 wann Chang wieder verletzt wird.
604
	//
605
	//		 To determine the overall amount of time available for
606
	//		 the player to save Chang, increase the total amount of
607
	//		 health chang has. -- This will likely be done in the same place
608
	//		 that you call the updatebosshealth().  Keep in mind that health
609
	//		 and maxboss health must be equal for the "lifebar" to be correct
610
	//
572 TickNSwist 611
 
612
	// ADDED WAIT (1.5) end of thread to make countdown 60 secs -TickNSwisted
520 lars 613
 
614
	//First Get Initial Value of Chang's life
615
	float collision;
616
	collision = $chang.gethealth();
617
 
618
	//Now, continue looping until chang is dead.  If chang is saved
619
	//before he dies, then killthread MUST be called on this thread
620
	//to stop this counter, or should it be? mwuhahahahahahaaaa!
621
	while( collision > 1.0 )
622
	{
623
		//Every iteration damage Chang
878 lars 624
		$chang.addhealth( -4.4 );
520 lars 625
		collision = $chang.gethealth();
626
		//print ("end of cinematic thread life counter\n");
627
		//Check if chang is 'dead".  If he is, then fail the mission
826 lars 628
		if ( collision < 1.0 )
520 lars 629
			{
630
				cam_fadeout( 3, 1, 1, 1, 1, 0 );
631
				$player.earthquake( 2, 2 );
632
				wait( 2 );
633
				$player.earthquake( 5, 2 );
634
				wait( 2 );
878 lars 635
				$player.kill();
520 lars 636
			}
637
		//Wait a specified interval before damaging again
572 TickNSwist 638
		wait( 1.5 );
520 lars 639
	}
640
}
641
//Energieumleitung wird benutzt
642
void energyrouting_Used()
643
{
644
	//print( "energyrouting_Used" );
645
	entity puzzle;
646
	puzzle = getcurrententity();
647
 
648
	globalTricorderRoute_Reset();
649
	globalTricorderRoute_SetSource1Row( 3 );
650
	globalTricorderRoute_SetDestination1( 6, 3 );
651
 
652
	//--- begin row definitions
653
 	globalTricorderRoute_BeginDef();
654
 	globalTricorderRoute_SetNextRow( 32, 32, 32, 32, 32, 32, 32, 32, 32 );
655
 	globalTricorderRoute_SetNextRow( 32, 32, 32, 32, 32, 11, 32, 32, 32 );
656
 	globalTricorderRoute_SetNextRow(  1, 20, 32, 32, 32,  7, 32, 32, 32 );
657
 	globalTricorderRoute_SetNextRow( 32,  8, 32, 32, 32, 23, 32, 32, 32 );
658
 	globalTricorderRoute_SetNextRow( 32, 18,  6, 16,  6,  1, 32, 32, 32 );
659
 	globalTricorderRoute_SetNextRow( 32, 32,  9, 32,  4, 22,  0,  3,  7 );
660
 	globalTricorderRoute_SetNextRow( 32, 32, 17, 32, 32, 32, 32,  2,  6 );
661
 	globalTricorderRoute_SetNextRow( 32, 32, 11, 32, 32, 32, 32, 32, 32 );
662
 	globalTricorderRoute_SetNextRow( 32, 32, 32, 32, 32, 32, 32, 32, 32 );
663
 	globalTricorderRoute_SetNextRow( 32, 32, 32, 32, 32, 32, 32, 32, 32 );
664
 	globalTricorderRoute_SetNextRow( 32, 32, 32, 32, 32, 32, 32, 32, 32 );
665
 
666
 	//--- run the puzzle
667
 	globalTricorderRoute_Run( puzzle, 0 );
668
}
669
 
670
//Energieumleitung falsch
671
void energyrouting_Failed()
672
{
673
	$energyrouting.puzzleobject_reset();
674
}
675
 
676
//Energieumleitung abgebrochen
677
void energyrouting_Canceled()
678
{
679
	$energyrouting.puzzleobject_reset();
680
}
681
 
682
//Energieumleitung abgeschlossen
683
void energyrouting_Solved()
684
{
685
	spawn( "Camera", "targetname", "illia_beamout_cam" );
686
	wait( 0.5 );
687
	$illia_beamout_cam.follow( $illia_beamout_path );
688
	$illia_beamout_cam.cut();
689
	wait( 0.5 );
690
 
691
	killthread( "collision_counter" );
692
	killthread( "loop_explosions_bridge" );
693
	$chang.updatebosshealth( 0 );
694
	//Make the objective complete
695
	$player.setobjectivecomplete( "transportout", 1 );
696
	//Make the blip disappear on your radar
890 avenger 697
	if(doesEntityExist($illias_transporter_console)){
698
		$illias_transporter_console.missionobjective( 0 );
699
	}
520 lars 700
 
701
	freezeplayer();
702
	$player.hide();
703
	$player.notsolid();
704
	cinematic();
705
	letterbox( 0.1 );
706
 
707
	$beam_illia.show();
708
 
709
	cuecamera( $illia_beamout_cam );
710
	wait( 2 );
711
 
712
	$beam_illia.DisplayEffect( "TransportOut", "Romulan" );
713
	wait( 2.7 );
714
 
715
	cam_fadeout( 2, 0, 0, 0, 1, 0 );
716
 
717
	musicvolume( 1.2, .1 );
718
	music( "action" );
719
	wait( .3 );
720
	//thread warbirds_boom();
721
	warbirds_boom();
722
}
723
 
724
void warbirds_boom()
725
{
726
	$player.notsolid();
727
	$player.hide();
728
	//letterbox( .1 );
729
	//cinematic();
730
	//freezeplayer();
731
 
732
	$planet.show();
733
 
734
	$cam1.follow($collision_cam1, $warbird_collision_illia);
735
	$cam1.cut();
736
	wait( .1 );
737
	cam_fadein( 2, 0, 0, 0, 1, 0 );
738
	cuecamera($cam1);
739
 
740
	$warbird_collision_illia.time(12.2);
741
	$warbird_collision_illia.moveto($collision_point);
742
	wait( 4 );
743
 
744
	$cam2.follow($collision_cam2);
745
	$cam2.cut();
746
	wait( .1 );
747
	cuecamera($cam2);
748
	wait( 4 );
749
 
750
	$cam3.follow($collision_cam3);
751
	$cam3.cut();
752
	wait( .1 );
753
	cuecamera($cam3);
754
 
755
	wait( 3.2 );
756
	triggerentity($exp_col1);
757
	wait( .5 );
758
	triggerentity($exp_col2);
759
	wait( .1 );
760
	triggerentity($exp_col3);
761
	wait( .1 );
762
	triggerentity($bigboom);
763
	$warbird_collision_illia.hide();
764
	$warbird_collision_tal.hide();
765
 
766
	wait( 3 );
641 argyle 767
	stuffcmd("map map8 \n");
768
 
769
/*
520 lars 770
	$player.show();
771
	$player.solid();
772
	clearletterbox( .1 );
773
	noncinematic();
774
	releaseplayer();
775
	cueplayer();
641 argyle 776
*/
549 TickNSwist 777
 
778
}
779
 
572 TickNSwist 780
void hall_collapse()
781
{
782
 triggerentity( $exp_hall_01 );
641 argyle 783
 $player.playsound ("sound/environment/metal/bigcreak.wav" );
784
 //$hall_rotate.playsound ("sound/environment/metal/metal_creak2.wav" );
572 TickNSwist 785
 $player.earthquake( 3, 4 );
786
 wait (.5);
787
 triggerentity( $exp_hall_02 );
643 ticknswist 788
 triggerentity( $snd_hall_02 );
789
 $hall_rotate.playsound ( "sound/environment/metal/metal_explo3.wav" );
790
 
572 TickNSwist 791
 $hall_rotate.time (1);
792
 $hall_rotate.movedown (320);
793
 wait (1);
643 ticknswist 794
 $player.playsound ("sound/explo_large_06.wav" );
572 TickNSwist 795
}
549 TickNSwist 796
 
797
 
798
 
799
 
800