Subversion-Projekte sthq.gbs

Revision

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