Subversion-Projekte sthq.gbs

Revision

Revision 824 | Revision 878 | 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
//
826 lars 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"
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
 
222
//--Sonstiges
223
	$sparks.hide();
224
	$planet.hide();
225
 
226
	$cam1.follow($map7_cam1);
227
	$cam1.cut();
228
	wait( .1 );
229
	cuecamera($cam1);
230
}
231
 
232
void shoot_disrupter(entity weapon_parm, entity origin_parm, entity target_parm)
233
{
234
	weapon_parm.origin(origin_parm.getorigin() );
235
	weapon_parm.show();
236
	weapon_parm.playsound("sound/weapons/radgun/rad_fire.wav");
237
	weapon_parm.time(3);
238
	weapon_parm.moveto(target_parm);
239
	wait(1);
240
	weapon_parm.scale(0.000000001);
241
	wait(2.1);
242
	weapon_parm.hide();
243
}
244
 
245
void shoot_tal(entity weapon_parm, entity origin_parm, entity target_parm, string explosion_parm, entity other_entity)
246
{
247
	weapon_parm.origin(origin_parm.getorigin() );
248
	weapon_parm.show();
249
	weapon_parm.playsound("sound/weapons/radgun/rad_fire.wav");
250
	weapon_parm.time(1.5);
251
	weapon_parm.moveto(target_parm);
252
	wait(.5);
253
	weapon_parm.scale(0.00001);
254
	wait(1);
255
	trigger( explosion_parm);
256
	wait(.1);
257
	other_entity.show();
258
	weapon_parm.remove();
259
}
260
 
261
 
262
void moveWarbird()
263
{
264
	triggerEntity( $warp );
265
	$bird1_origin1.followpath($bird1_path1);
266
	$cam1_origin1.playsound( "sound/ent_getoutof_warp.wav", 0, 4, 20000 );
267
}
268
 
269
void intro()
270
{
641 argyle 271
	skipthread("finish_intro");
520 lars 272
	cam_fadein( 4, 0, 0, 0, 1, 0 );
273
	wait(3);
274
	//Menu below modified by DrBob on 07/03/04 to hide mouse
275
	stuffcmd( "showmenu oberth_system\n" );
276
	wait(4);
277
	stuffcmd ( "popmenu 0\n" );
278
	wait( 2 );
279
	triggerEntity( $warp );
280
	$warbird1_origin.followpath($warbird_path1);
281
	//Modified on 07/03/04 by DrBob to add warpin sound.
282
	$warbird1_origin.playsound( "sound/ent_getoutof_warp.wav", 0, 4, 20000 );
283
	$warbird1.show();
284
	wait( 4 );
285
	$cam2.follow($introcam_1);
286
	$cam2.cut();
287
	wait(.1);
288
	cuecamera($cam2);
289
	wait( 4 );
641 argyle 290
	romulancommander();
520 lars 291
}
292
 
293
void firstShoot()
294
{
295
	$cam4.follow($map7_cam2);
296
	$cam4.cut();
297
	wait( .1 );
298
	cuecamera($cam4);
299
    	wait(.5);
300
    	thread shoot_disrupter($fire1, $fire_origin1, $fire);
301
	wait(1);
302
	thread shoot_disrupter($fire2, $fire_origin2, $fire);
303
	wait( 2 );
641 argyle 304
	attack_outpost();
520 lars 305
}
306
 
307
void romulancommander()
308
{
309
	$cam3.follow( $map7_rom1 );
310
	$cam3.cut();
311
	wait(.1);
312
	cuecamera($cam3);
313
	$screen.show();
314
 	$romulan.playdialog("localization/sound/dialog/map07/Tebok/approaching.mp3",1,10000,0);
315
 	waitfordialog($romulan);
316
 	$romulan.playdialog("localization/sound/dialog/map07/Tebok/military.mp3",1,10000,0);
317
 	waitfordialog($romulan);
318
 	$romulan.playdialog("localization/sound/dialog/map07/Tebok/turnyourship.mp3",1,10000,0);
319
	waitfordialog($romulan);
320
	$screen.hide();
321
	wait( 1.5 );
322
	$cam2.follow( $map7_illia_cam1 );
323
	$cam2.cut();
324
	wait(.1);
325
	cuecamera($cam2);
326
	wait( .4 );
327
	$illia.morph( "exp_Surprise" );
328
	$illia.playdialog("localization/sound/dialog/map07/illia/heisangry.mp3", 1, 10000, 0);
329
	wait(1);
330
	$illia.anim( "ent-frontchair-gesture1" );
331
	wait( 1.5 );
332
	$illia.unmorph( "exp_Surprise" );
641 argyle 333
	firstShoot();
520 lars 334
}
335
 
336
void attack_bridge()
337
{
338
	$cam4.follow( $map7_rom2 );
339
	$cam4.cut();
340
	wait(.1);
341
	cuecamera($cam4);
342
	cam_fadein( 1.5, 0, 0, 0, 1, 0 );
343
	wait( .5 );
344
	$player.earthquake( 2, 2 );
345
	triggerentity( $exp_center );
346
	$exp_center.playsound( "sound/impact/explosion/expl_distnode1.wav", 0, 4, 20000 );
347
	$sparks.show();
348
	triggerentity( $exp_behind );
349
	wait( 1.5 );
350
	triggerentity( $exp_behind );
351
	wait( .2 );
352
	triggerentity( $exp_screen2 );
353
	$player.earthquake( 1, 3.5 );
354
	wait( .7 );
355
	$cam4.earthquake( 1, 1 );
356
	wait( 1 );
357
	triggerentity( $exp_screen2 );
358
	triggerentity( $exp_screen1 );
572 TickNSwist 359
	wait( .5 );
520 lars 360
	cam_fadeout( 2, 0, 0, 0, 1, 0 );
572 TickNSwist 361
	wait( .2 );
520 lars 362
	triggerentity( $exp_2 );
572 TickNSwist 363
	wait( .2 );
520 lars 364
	cam_fadein( 1, 0, 0, 0, 1, 0 );
572 TickNSwist 365
	triggerentity( $exp_screen_trans );
520 lars 366
	cuecamera($cam2);
367
	$illia_prisoner3.playdialog("localization/sound/dialog/map07/illia/warbirdof.mp3", 1, 10000, 0);
368
	waitfordialog( $illia_prisoner3 );
369
	$illia_prisoner3.playdialog("localization/sound/dialog/map07/illia/collision.mp3", 1, 1000, 0);
370
	waitfordialog( $illia_prisoner3 );
371
 
372
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
373
	wait( 2 );
641 argyle 374
	bridge_endcinematic();
520 lars 375
}
376
 
377
void decloak_warbird()
378
{
379
	cam_fadein( 1, 0, 0, 0, 1, 0 );
380
	$cam2.fov( 85 );
381
	$cam2.follow( $map7_p_illia1 );
382
	$cam2.cut();
383
	wait(.1);
384
	cuecamera($cam2);
385
	wait( 2.1 );
386
	$illia_prisoner3.playdialog("localization/sound/dialog/map07/illia/itwascleartome.mp3", 1, 10000, 0);
387
	waitfordialog( $illia_prisoner3 );
388
	$illia_prisoner3.playdialog("localization/sound/dialog/map07/illia/minutesof.mp3", 1, 10000, 0);
389
	waitfordialog( $illia_prisoner3 );
390
	wait( 1.3 );
391
	$illia_prisoner3.playdialog("localization/sound/dialog/map07/illia/notgoingtoget.mp3", 1, 10000, 0);
392
	waitfordialog( $illia_prisoner3 );
393
	$torp_1.hide();
394
	$torp_2.hide();
395
	wait( .2 );
396
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
397
	wait( 2 );
398
	$cam3.follow( $introcam_2 );
399
	$cam3.cut();
400
	wait( .1 );
401
	cuecamera($cam3);
402
	cam_fadein( 2, 0, 0, 0, 1, 0 );
403
	wait( 1.7 );
404
 
405
	//Decloak the ship
406
	$warbird_talshiar.playsound( "sound/cloak.wav", 0, 4, 20000 );
407
	$warbird_talshiar.fadein( 2, 1 );
408
	$warbird_talshiar.show();
409
	wait(2.5);
410
	$cam1.follow( $map7_cam3 );
411
	$cam1.cut();
412
	wait( .1 );
413
	cuecamera( $cam1 );
414
 
415
	wait( .5 );
416
    	thread shoot_tal($torp_1, $weapon_tal_origin, $weapon_tal_origin1, "$explosion", $illia_plasmaleak );
417
	wait( 1 );
418
    	thread shoot_tal($torp_2, $weapon_tal_origin, $weapon_tal_origin1, "$explosion2", $illia_flames);
419
	wait( 3 );
420
 
421
	cam_fadeout( 2, 0, 0, 0, 1, 0 );
422
	wait( 2 );
423
	cam_fadein( 1, 0, 0, 0, 1, 0 );
424
 
425
    	cuecamera($cam2);
426
	$illia_prisoner3.playdialog("localization/sound/dialog/map07/illia/shouldnot.mp3", 1, 10000, 0);
427
	waitfordialog( $illia_prisoner3 );
428
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
429
	wait( 1.5 );
641 argyle 430
	attack_bridge();
520 lars 431
}
432
 
433
void attack_outpost()
434
{
435
	$cam1.follow( $map7_outpost_cam1 );
436
	$cam1.cut();
437
	wait(.1);
438
 
439
	cuecamera ($cam1);
440
	wait(.7);
441
	thread disrupter0();
442
	wait(1);
443
	thread disrupter1();
444
	wait(1);
445
	thread disrupter2();
446
	wait(1);
447
	thread disrupter3();
448
	wait( 4 );
641 argyle 449
	decloak_warbird();
520 lars 450
}
451
 
452
void bridge_endcinematic()
453
{
454
	$cam4.follow( $map7_rom2 );
455
	$cam4.cut();
456
	wait(.1);
457
	cam_fadein( 2, 0, 0, 0, 1, 0 );
458
	cuecamera($cam4);
459
 
460
	wait( .5 );
461
	$player.earthquake( 2, 2 );
462
	triggerentity( $exp_screen2 );
463
	wait( 1);
464
	$player.earthquake( 2.2, 1 );
465
	triggerentity( $exp_screen1 );
466
	wait( .4 );
467
	$player.earthquake( 1.5, 1 );
468
	triggerentity( $exp_behind );
469
	triggerentity( $exp_screen2 );
470
	wait( .6 );
471
	triggerentity( $exp_screen1 );
472
	$player.earthquake( 1, .4 );
473
	wait( .5 );
474
	triggerentity( $exp_behind );
572 TickNSwist 475
	wait(.3);
476
	triggerentity( $exp_screen_trans );
641 argyle 477
	thread finish_intro();
520 lars 478
}
479
 
480
void loop_explosions_bridge()
481
{
482
	triggerentity( $exp_center );
483
	$exp_center.playsound( "sound/impact/explosion/expl_distnode1.wav", 0, 4, 20000 );
484
	$player.earthquake( .5, 1 );
485
	wait( 2 );
486
	triggerentity( $exp_screen1 );
487
	wait( 2.5 );
488
	triggerentity( $exp_Screen2 );
489
	triggerentity( $exp_behind );
490
	wait( 2 );
491
	$player.earthquake( .5, 1 );
492
	triggerentity( $exp_screen1 );
493
	wait( 2 );
494
	triggerentity( $exp_behind );
495
	wait( 1 );
496
	triggerentity( $exp_screen2 );
497
	triggerentity( $exp_center );
498
	$exp_center.playsound( "sound/impact/explosion/expl_drullship.wav", 0, 4, 20000 );
499
	$player.earthquake( 1, 2 );
500
	wait( 2 );
501
	triggerentity( $exp_behind );
502
	wait( 1 );
503
	thread loop_explosions_bridge();
504
}
505
 
506
void disrupter0()
507
{
508
	$torp_0.followpath( $proj0_path);
509
	wait(2);
510
 
511
	trigger( "$bigBang11" );
512
	$bigBang11.playsound( "sound/impact/explosion/explo_disruptor.wav", 0, 4, 20000 );
513
	wait(.1);
514
	trigger( "$bigBang12" );
515
	wait(.1);
516
	trigger( "$bigBang13" );
517
	wait(.1);
518
}
519
 
520
void disrupter1()
521
{
522
	$torp_1.followpath( $proj1_path);
523
	wait(1.7);
524
	$player.earthquake( 1, 0.3 );
525
	trigger( "$bigBang1" );
526
	$bigBang1.playsound( "sound/impact/explosion/expl_towerfall.wav", 0, 4, 20000 );
527
	wait(.1);
528
	trigger( "$bigBang3" );
529
	wait(.1);
530
	trigger( "$bigBang4" );
531
	wait(.1);
532
	trigger( "$bigBang5" );
533
	$torp_1.trigger("debris");
534
	wait(2);
535
	$debris.hide();
536
}
537
 
538
void disrupter2()
539
{
540
	$torp_2.followpath( $proj2_path);
541
 
542
	wait(2);
543
	$player.earthquake( 1, 0.5 );
544
	trigger( "$bigBang2" );
545
	$bigBang2.playsound( "sound/impact/explosion/explo_shuttleint.wav", 0, 4, 20000 );
546
	wait(.1);
547
	trigger( "$bigBang6" );
548
	wait(.1);
549
	trigger( "$bigBang7" );
550
	//$proj1_origin.trigger("debris2");
551
	trigger( "$debris2");
552
}
553
 
554
void disrupter3()
555
{
556
	$torp_3.followpath( $proj3_path);
557
	wait(2);
558
	$player.earthquake( 1, 1 );
559
 
560
	trigger( "$bigBang8" );
561
	$bigBang8.playsound( "sound/impact/explosion/explo_wall1.wav", 0, 4, 20000 );
562
	cam_fadeout( 1.5, 1, 1, 1, 1, 0 );
563
	wait(.1);
564
	trigger( "$bigBang9" );
565
	wait(.1);
566
	trigger( "$bigBang10" );
567
	wait(.1);
568
	trigger( "$bigBang8" );
569
	wait(.1);
570
	trigger( "$bigBang9" );
571
	wait(.1);
572
	trigger( "$bigBang10" );
573
}
574
 
575
void activate_trigger_count()
576
{
577
	$stopCounter.triggerable();
578
}
579
 
580
void collision_counter()
581
{
582
///////////////////////////COLLSISION-COUNTER/////////////////////////////////////
641 argyle 583
//////////////////////////Time to collsision:////////////////////////////////////
584
//////////////////////////////60 SECONDS/////////////////////////////////////////
520 lars 585
	//
586
	//Note:  Um den Timer zu verändern, kann man zwei Werte verändern.
587
	//		 Der erste Wert ist dazu da, um festzulegen, wie wiel Schaden
588
	//		 verursacht wird. Der zweite Wert ist dazu da, um festzulegen
589
	//		 wann Chang wieder verletzt wird.
590
	//
591
	//		 To determine the overall amount of time available for
592
	//		 the player to save Chang, increase the total amount of
593
	//		 health chang has. -- This will likely be done in the same place
594
	//		 that you call the updatebosshealth().  Keep in mind that health
595
	//		 and maxboss health must be equal for the "lifebar" to be correct
596
	//
572 TickNSwist 597
 
598
	// ADDED WAIT (1.5) end of thread to make countdown 60 secs -TickNSwisted
520 lars 599
 
600
	//First Get Initial Value of Chang's life
601
	float collision;
602
	collision = $chang.gethealth();
603
 
604
	//Now, continue looping until chang is dead.  If chang is saved
605
	//before he dies, then killthread MUST be called on this thread
606
	//to stop this counter, or should it be? mwuhahahahahahaaaa!
607
	while( collision > 1.0 )
608
	{
609
		//Every iteration damage Chang
826 lars 610
		$chang.addhealth( -1 );
520 lars 611
		collision = $chang.gethealth();
612
		//print ("end of cinematic thread life counter\n");
613
		//Check if chang is 'dead".  If he is, then fail the mission
826 lars 614
		if ( collision < 1.0 )
520 lars 615
			{
616
				cam_fadeout( 3, 1, 1, 1, 1, 0 );
617
				$player.earthquake( 2, 2 );
618
				wait( 2 );
619
				$player.earthquake( 5, 2 );
620
				wait( 2 );
621
				stuffcmd ( "kill\n" );
622
			}
623
		//Wait a specified interval before damaging again
572 TickNSwist 624
		wait( 1.5 );
520 lars 625
	}
626
}
627
//Energieumleitung wird benutzt
628
void energyrouting_Used()
629
{
630
	//print( "energyrouting_Used" );
631
	entity puzzle;
632
	puzzle = getcurrententity();
633
 
634
	globalTricorderRoute_Reset();
635
	globalTricorderRoute_SetSource1Row( 3 );
636
	globalTricorderRoute_SetDestination1( 6, 3 );
637
 
638
	//--- begin row definitions
639
 	globalTricorderRoute_BeginDef();
640
 	globalTricorderRoute_SetNextRow( 32, 32, 32, 32, 32, 32, 32, 32, 32 );
641
 	globalTricorderRoute_SetNextRow( 32, 32, 32, 32, 32, 11, 32, 32, 32 );
642
 	globalTricorderRoute_SetNextRow(  1, 20, 32, 32, 32,  7, 32, 32, 32 );
643
 	globalTricorderRoute_SetNextRow( 32,  8, 32, 32, 32, 23, 32, 32, 32 );
644
 	globalTricorderRoute_SetNextRow( 32, 18,  6, 16,  6,  1, 32, 32, 32 );
645
 	globalTricorderRoute_SetNextRow( 32, 32,  9, 32,  4, 22,  0,  3,  7 );
646
 	globalTricorderRoute_SetNextRow( 32, 32, 17, 32, 32, 32, 32,  2,  6 );
647
 	globalTricorderRoute_SetNextRow( 32, 32, 11, 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
 	globalTricorderRoute_SetNextRow( 32, 32, 32, 32, 32, 32, 32, 32, 32 );
651
 
652
 	//--- run the puzzle
653
 	globalTricorderRoute_Run( puzzle, 0 );
654
}
655
 
656
//Energieumleitung falsch
657
void energyrouting_Failed()
658
{
659
	$energyrouting.puzzleobject_reset();
660
}
661
 
662
//Energieumleitung abgebrochen
663
void energyrouting_Canceled()
664
{
665
	$energyrouting.puzzleobject_reset();
666
}
667
 
668
//Energieumleitung abgeschlossen
669
void energyrouting_Solved()
670
{
671
	spawn( "Camera", "targetname", "illia_beamout_cam" );
672
	wait( 0.5 );
673
	$illia_beamout_cam.follow( $illia_beamout_path );
674
	$illia_beamout_cam.cut();
675
	wait( 0.5 );
676
 
677
	killthread( "collision_counter" );
678
	killthread( "loop_explosions_bridge" );
679
	$chang.updatebosshealth( 0 );
680
	//Make the objective complete
681
	$player.setobjectivecomplete( "transportout", 1 );
682
	//Make the blip disappear on your radar
683
	$illias_transporter_console.missionobjective( 0 );
684
 
685
	freezeplayer();
686
	$player.hide();
687
	$player.notsolid();
688
	cinematic();
689
	letterbox( 0.1 );
690
 
691
	$beam_illia.show();
692
 
693
	cuecamera( $illia_beamout_cam );
694
	wait( 2 );
695
 
696
	$beam_illia.DisplayEffect( "TransportOut", "Romulan" );
697
	wait( 2.7 );
698
 
699
	cam_fadeout( 2, 0, 0, 0, 1, 0 );
700
 
701
	musicvolume( 1.2, .1 );
702
	music( "action" );
703
	wait( .3 );
704
	//thread warbirds_boom();
705
	warbirds_boom();
706
}
707
 
708
void warbirds_boom()
709
{
710
	$player.notsolid();
711
	$player.hide();
712
	//letterbox( .1 );
713
	//cinematic();
714
	//freezeplayer();
715
 
716
	$planet.show();
717
 
718
	$cam1.follow($collision_cam1, $warbird_collision_illia);
719
	$cam1.cut();
720
	wait( .1 );
721
	cam_fadein( 2, 0, 0, 0, 1, 0 );
722
	cuecamera($cam1);
723
 
724
	$warbird_collision_illia.time(12.2);
725
	$warbird_collision_illia.moveto($collision_point);
726
	wait( 4 );
727
 
728
	$cam2.follow($collision_cam2);
729
	$cam2.cut();
730
	wait( .1 );
731
	cuecamera($cam2);
732
	wait( 4 );
733
 
734
	$cam3.follow($collision_cam3);
735
	$cam3.cut();
736
	wait( .1 );
737
	cuecamera($cam3);
738
 
739
	wait( 3.2 );
740
	triggerentity($exp_col1);
741
	wait( .5 );
742
	triggerentity($exp_col2);
743
	wait( .1 );
744
	triggerentity($exp_col3);
745
	wait( .1 );
746
	triggerentity($bigboom);
747
	$warbird_collision_illia.hide();
748
	$warbird_collision_tal.hide();
749
 
750
	wait( 3 );
641 argyle 751
	stuffcmd("map map8 \n");
752
 
753
/*
520 lars 754
	$player.show();
755
	$player.solid();
756
	clearletterbox( .1 );
757
	noncinematic();
758
	releaseplayer();
759
	cueplayer();
641 argyle 760
*/
549 TickNSwist 761
 
762
}
763
 
572 TickNSwist 764
void hall_collapse()
765
{
766
 triggerentity( $exp_hall_01 );
641 argyle 767
 $player.playsound ("sound/environment/metal/bigcreak.wav" );
768
 //$hall_rotate.playsound ("sound/environment/metal/metal_creak2.wav" );
572 TickNSwist 769
 $player.earthquake( 3, 4 );
770
 wait (.5);
771
 triggerentity( $exp_hall_02 );
643 ticknswist 772
 triggerentity( $snd_hall_02 );
773
 $hall_rotate.playsound ( "sound/environment/metal/metal_explo3.wav" );
774
 
572 TickNSwist 775
 $hall_rotate.time (1);
776
 $hall_rotate.movedown (320);
777
 wait (1);
643 ticknswist 778
 $player.playsound ("sound/explo_large_06.wav" );
572 TickNSwist 779
}
549 TickNSwist 780
 
781
 
782
 
783
 
784