Subversion-Projekte sthq.gbs

Revision

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