Subversion-Projekte sthq.gbs

Revision

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

Revision Autor Zeilennr. Zeile
886 lars 1
// EF2 Level Script File
2
//
3
// Level:		map3.bsp
4
// Script By:	Cortex, Argyle, ltiefland
5
// Geometry By:	Argyle, Cortex, Alpharaptor
6
// Created on:	17/11/03
7
// Last Edited on:  $Date: 2007-06-14 19:42:15 +0200 (Do, 14 Jun 2007) $
8
// Last Edited by:	$Author: lars $
9
 
10
void main();
11
void warning();
12
void attack_p();
13
void initArchetypes();
14
void turbo();
15
void eng_beccy();
16
void eng_harm();
17
void eng_mac();
18
void closed_door_sound();
19
void closed_door_sound_2();
20
void cpanel();
21
void panel();
22
void secretopen();
23
void secretprint();
24
void secret();
25
void comp_found();
26
void gas1();
27
void redalert();
28
void enviromentalcontrols();
29
void maincomputercontrols();
30
void compcontrolsa();
31
void compcontrolsb();
32
void eng_cin();
33
void skip_eng_cin();
34
void com_cin();
35
void com_cin_end();
36
//void switch_alert_on();
37
 
38
float alert_on;
39
float eng_door=0;
40
 
41
#include "maps/global_scripts/global_archetype.scr"
42
#include "maps/global_scripts/global_common.scr"
43
#include "maps/global_scripts/global_playerLoadout.scr"
44
#include "maps/global_scripts/global_debugUtils.scr"
45
#include "maps/global_scripts/global_array.scr"
46
#include "maps/global_scripts/global_math.scr"
47
#include "maps/global_scripts/global_acceleratedMovement.scr"
48
#include "maps/attackplayer.scr"
49
 
50
void main()
51
{
52
//--------------------------------------------------
53
//	General Level Setup
54
//--------------------------------------------------
55
 
56
	$world.light_lightstyle( "redalert3", "a", 1 ); //switch off red alert lights
57
	$warn.nottriggerable();
58
	$attack.nottriggerable();
59
	$alert_green.show();
60
	$alert_red.hide();
61
	$roof_hatch.show();
62
	$roof_hatch.solid();
63
	$roof_hatch_floor.hide();
64
	$roof_hatch_floor.notsolid();
65
	$roof_hatch_cover.hide();
66
	$roof_hatch_cover.notsolid();
67
	$turbo_door.lock();
68
 
69
	soundtrack( "music/m6l1.mus" );
70
	waitForPlayer();//Wait until the player is ready
71
	$player.model("char/hazardteam_jurot.tik");
72
	$player.give( "models/weapons/worldmodel-tricorder-stx.tik" );
73
 
74
	//Add the objectives list
75
	$player.loadobjectives( "GBS3" );
76
	//Make a new objective appear: get to main computer control and Sabotge the engines
77
	//Make the blip appear on your radar
78
	$player.missionobjective( 1 );
79
	//Make the mission objective appear
80
	$player.setobjectiveshow( "gettoengineering", 1 );
81
 
82
	$illia_prisoner.ai_off();
83
	$illia_prisoner.pushable(0);
84
	$illia_prisoner.hide();
85
	$illia_prisoner.notsolid();
86
	$illia_prisoner.removeactorweapon ( "CompressionRifle" );
87
	$illia_prisoner.removeactorweapon ( "AssaultRifle" );
88
	$illia_prisoner.removeactorweapon ( "CompressionRifleEnhanced" );
89
//	$attack.nottriggerable();
90
	$player.take ( "models/weapons/worldmodel-compressionrifle.tik" );
91
	$player.take ( "models/weapons/worldmodel-fieldassaultrifle.tik" );
92
	$player.take ( "models/weapons/worldmodel-burstrifle.tik" );
93
	$player.take ( "models/weapons/worldmodel-attrex-rifle.tik" );
94
	$player.take ( "models/weapons/worldmodel-compressionrifle.tik" );
95
	$player.take ( "models/weapons/worldmodel-phaser-STX.tik" );
96
 
97
	//--------------------------------------------------
98
	//	Red Alert Setup
99
	//--------------------------------------------------
100
 
101
	$panel_alert_on.hide();
102
	$panel_alert_off.show();
103
 
104
 
105
	//--------------------------------------------------
106
	//	Camera Setup
107
	//--------------------------------------------------
108
 
109
	spawn ( "Camera" , "targetname" , "cam1" );
110
	spawn ( "Camera" , "targetname" , "cam2" );
111
	spawn ( "Camera" , "targetname" , "cam3" );
112
	spawn ( "Camera" , "targetname" , "cam4" );
113
 
114
	//--------------------------------------------------
115
	//	Cargobay 4 Setup
116
	//--------------------------------------------------
117
	$cargopanelg.hide();
118
	$cargopanelr.show();
119
	$cargodoors.unlock();
120
 
121
	//--------------------------------------------------
122
	//	Jefferies Tube Setup
123
	//--------------------------------------------------
124
	//	SECRET SETUP
125
	$secretdoor.lock();
126
	$secret_red.show();
127
	$secret_green.hide();
128
	//	GENERAL SETUP
129
	$exitdoor.lock();
130
	$jdoor1.unlock();
131
	$jdoor2.lock();
132
	$jdoor2g.hide();
133
	$jdoor2r.show();
134
	$jdoor1_locked.nottriggerable();
135
 
136
	//--------------------------------------------------
137
	//	Main Compter Control Room Setup
138
	//--------------------------------------------------
139
	$comroomdoor.lock();
140
	//$engcong.show(); //NULL E
141
	//$engconr.hide(); //NULL E
142
	$gas3.hide();
143
	$gas4.hide();
144
	$gas5.hide();
145
	$gas6.hide();
146
	$hurt1.nottriggerable();
147
 
148
	//--------------------------------------------------
149
	//	Main Engineering Setup
150
	//--------------------------------------------------
151
	$bails.ai_off();
152
	$bails.removeactorweapon ( "CompressionRifle" );
153
	$bails.useactorweapon( "Tricorder" );
154
	$bails.anim( "tricorder_use_loop" );
155
	$bails.pushable( 0 );
156
 
157
	$jones.ai_off();
158
	$jones.anim("ent-curvedconsole-gesture");
159
	$jones.removeactorweapon ( "CompressionRifle" );
160
	$jones.useactorweapon( "none" );
161
	$jones.pushable( 0 );
162
 
163
	/*shaun was removed in order to save frames //Chrisstrahl
164
	$shaun.ai_off();
165
	$shaun.anim("ent-compstation-idle");
166
	$shaun.removeactorweapon ( "CompressionRifle" );
167
	$shaun.useactorweapon( "none" );
168
	$shaun.pushable( 0 );*/
169
 
170
	$jenks.ai_off();
171
	$jenks.anim("ent-compstation-gesture1");
172
	$jenks.removeactorweapon ( "CompressionRifle" );
173
	$jenks.useactorweapon( "none" );
174
	$jenks.pushable( 0 );
175
 
176
	/*  //NULL E
177
	$eddie.ai_off();
178
	$eddie.anim("ent-compstation-gesture1");
179
	$eddie.removeactorweapon ( "CompressionRifle" );
180
	$eddie.useactorweapon( "none" );
181
	$eddie.pushable( 0 );*/
182
 
183
	/*  //NULL E
184
	$catrin.ai_off();
185
	$catrin.removeactorweapon ( "CompressionRifle" );
186
	$catrin.useactorweapon( "none" );
187
	$catrin.pushable( 0 );*/
188
 
189
	$engdoor1.time(0.1);
190
	$engdoor1.moveDown(176);
191
	$engdoor1.notsolid();
192
	$engdoor1.hide();
193
 
194
	$beccy.ai_off();
195
	$beccy.removeactorweapon ( "CompressionRifle" );
196
	$beccy.useactorweapon( "none" );
197
	$beccy.pushable( 0 );
198
 
199
	$harm.ai_off();
200
	$harm.removeactorweapon ( "CompressionRifle" );
201
	$harm.useactorweapon( "none" );
202
	$harm.pushable( 0 );
203
 
204
	$mac.ai_off();
205
	$mac.removeactorweapon ( "CompressionRifle" );
206
	$mac.useactorweapon( "none" );
207
	$mac.pushable( 0 );
208
 
209
	$bud.ai_off();
210
	$bud.removeactorweapon ( "CompressionRifle" );
211
	$bud.useactorweapon( "none" );
212
	$bud.pushable( 0 );
213
	$bud.anim("kneel_working_idle");
214
 
215
	/* Jane was removed in order to save frames //Chrissstrahl
216
	$jane.ai_off();
217
	$jane.removeactorweapon ( "CompressionRifle" );
218
	$jane.useactorweapon( "none" );
219
	$jane.pushable( 0 );
220
	$jane.anim("ent-library-stand-scan");*/
221
 
222
	//This ship was removed for performance issues
223
	//$holo_excelsior.bind($holo_excelsior_origin);
224
	//$holo_excelsior.followpath( $holo_excelsior_nav1 );
225
 
226
	//--------------------------------------------------
227
	//	Main Engineering Cinematic Setup
228
	//--------------------------------------------------
229
 
230
	$illia.ai_off();
231
	$illia.pushable( 0 );
232
	$illia.notsolid();
233
	$illia.hide();
234
 
235
	wait(0.1);
236
 
237
	$moya.ai_off();
238
	$moya.pushable( 0 );
239
	$moya.useactorweapon( "EnterpriseDatapad" );
240
	$moya.anim( "ent-datapad-use" );
241
 
242
	thread initArchetypes();
243
 
244
 
245
	//--------------------------------------------------
246
	//	Computer Control Room Cinematic Setup
247
	//--------------------------------------------------
248
 
249
	$illia2.ai_off();
250
	$illia2.pushable( 0 );
251
	$illia2.notsolid();
252
	$illia2.hide();
253
 
254
	wait(0.1);
255
 
256
	$moya2.ai_off();
257
	$moya2.pushable( 0 );
258
	$moya2.notsolid();
259
	$moya2.hide();
260
 
261
	$eng_field.notsolid();
262
	$eng_field.hide();
263
	$eng_field.notsolid();
264
 
265
	//--------------------------------------------------
266
	//	Security Team Setup
267
	//--------------------------------------------------
268
 
269
	$security1.setgroupid ( 666 );
270
	$security1.giveactorweapon( "actorweapons/fed-compressionrifle.tik", 1.0 );
271
	$security1.useactorweapon( "CompressionRifle" );
272
	$security1.pushable( 0 );
273
 
274
	$security2.setgroupid ( 666 );
275
	$security2.giveactorweapon( "actorweapons/fed-compressionrifle.tik", 1.0 );
276
	$security2.useactorweapon( "CompressionRifle" );
277
	$security2.pushable( 0 );
278
 
279
	//Hide team till red alert
280
	$security1.hide();
281
	$security1.notsolid();
282
	$security2.hide();
283
	$security2.notsolid();
284
 
285
	$exitdoor.lock();
286
	$cargodoors_sound.nottriggerable();
287
 
288
 
289
	thread turbo();
290
	thread eng_beccy();
291
	thread eng_harm();
292
	thread eng_mac();
293
}
294
 
295
void climbing_up()
296
{
297
	AIShowGroup    ( 667, "Federation" );
298
	//$security1.ai_on();
299
	//$security2.ai_on();
300
	CommandToGroup ( 667 , "groupactortype" , "enemy" , "");
301
	CommandToGroup ( 667 , "visiondistance" , "4000" , "" );
302
	CommandToGroup ( 667 , "fov" , "360" , "" );
303
	CommandToGroup ( 667 , "attack" , "$player" , "" );
304
}
305
 
306
 
307
 
308
//--------------------------------------------------
309
// Archetype Setup
310
//--------------------------------------------------
311
 
312
// These let you see the information the tricorder displays about an object
313
 
314
void initArchetypes()
315
{
316
 
317
	thread globalArchetype_Setup( $tubedoor_controls, "tubedoorc");
318
	thread globalArchetype_Setup( $environmental_controls, "enviroc");
319
	thread globalArchetype_Setup( $maincomputer_controls, "compc");
320
	thread globalArchetype_Setup( $computer_a, "compa");
321
	thread globalArchetype_Setup( $computer_b, "compb");
322
	thread globalArchetype_Setup( $tubedoor_controls_2, "tubed");
323
 
324
	$bails.archetype ( "bails" );
325
	$jones.archetype ( "jones" );
326
	$jenks.archetype ( "jenks" );
327
	/*$shaun.archetype ( "shaun" );*/ //shaun was removed in order to save frames
328
	//$eddie.archetype ( "eddie" ); //NULL E
329
	//$catrin.archetype ( "catrin" ); //NULL E
330
}
331
 
332
void turbo()
333
{
334
	$player.loopsound( "sound/ships/enterprise/ent_turbolift_runloop.wav");
335
	wait(4);
336
	$player.stoploopsound();
337
	$player.playsound( "sound/ships/enterprise/ent_turbolift_stop.wav");
338
	wait(2.5);
339
	$turbo_door.unlock();
340
}
341
 
342
void eng_beccy()
343
{
344
	$beccy.useactorweapon( "Tricorder" );
345
	$beccy.anim( "tricorder_use_loop" );
346
	wait(3);
347
	$beccy.anim("idle");
348
	$beccy.useactorweapon( "none" );
349
	wait(0.2);
350
	$beccy.turntoangle( 315 );
351
	$beccy.walkto("$beccy_eng_nav1", "walk" );
352
	waitfor( $beccy );
353
	$beccy.useactorweapon( "Tricorder" );
354
	$beccy.anim( "tricorder_use_loop" );
355
	wait(4);
356
	$beccy.useactorweapon( "none" );
357
	$beccy.anim( "idle" );
358
	$beccy.walkto("$beccy_eng_nav2", "walk" );
359
	waitfor( $beccy );
360
	$beccy.walkto("$beccy_eng_nav2", "walk" );
361
	waitfor( $beccy );
362
	$beccy.walkto("$beccy_eng_nav3", "walk" );
363
	waitfor( $beccy );
364
	$beccy.walkto("$beccy_eng_nav4", "walk" );
365
	waitfor( $beccy );
366
	$beccy.useactorweapon( "EnterpriseDatapad" );
367
	$beccy.anim( "ent-datapad-use" );
368
	wait(5);
369
	$beccy.walkto("$beccy_eng_nav5", "walk" );
370
	waitfor( $beccy );
371
	$beccy.walkto("$beccy_eng_nav6", "walk" );
372
	waitfor( $beccy );
373
	$beccy.walkto("$beccy_eng_nav7", "walk" );
374
	waitfor( $beccy );
375
	$beccy.useactorweapon( "none" );
376
	$beccy.anim( "idle" );
377
	wait(0.1);
378
	$beccy.useactorweapon( "Tricorder" );
379
	$beccy.anim( "tricorder_use_loop" );
380
	wait(3);
381
	$beccy.walkto("$beccy_eng_nav8", "walk" );
382
	waitfor( $beccy );
383
	$beccy.walkto("$beccy_eng_nav9", "walk" );
384
	waitfor( $beccy );
385
 
386
	thread eng_beccy();
387
}
388
 
389
void eng_harm()
390
{
391
	$harm.useactorweapon( "EnterpriseDatapad" );
392
	$harm.anim( "ent-datapad-use" );
393
	$harm.walkto("$harm_eng_nav1", "walk" );
394
	waitfor( $harm );
395
	$harm.walkto("$harm_eng_nav2", "walk" );
396
	waitfor( $harm );
397
	$harm.walkto("$harm_eng_nav3", "walk" );
398
	waitfor( $harm );
399
	$harm.walkto("$harm_eng_nav4", "walk" );
400
	waitfor( $harm );
401
	$harm.walkto("$harm_eng_nav5", "walk" );
402
	waitfor( $harm );
403
	$harm.useactorweapon( "none" );
404
	$harm.anim( "idle" );
405
	wait(1);
406
	$harm.useactorweapon( "Tricorder" );
407
	$harm.anim( "tricorder_use_loop" );
408
	wait(3);
409
	$harm.useactorweapon( "none" );
410
	$harm.anim( "idle" );
411
	$harm.walkto("$harm_eng_nav6", "walk" );
412
	waitfor( $harm );
413
	$harm.walkto("$harm_eng_nav7", "walk" );
414
	waitfor( $harm );
415
	$harm.walkto("$harm_eng_nav8", "walk" );
416
	waitfor( $harm );
417
	$harm.walkto("$harm_eng_nav9", "walk" );
418
	waitfor( $harm );
419
	$harm.walkto("$harm_eng_nav10", "walk" );
420
	waitfor( $harm );
421
	$harm.useactorweapon( "Tricorder" );
422
	$harm.anim( "tricorder_use_loop" );
423
	wait(4);
424
	$harm.useactorweapon( "none" );
425
	$harm.anim( "idle" );
426
	$harm.walkto("$harm_eng_nav11", "walk" );
427
	waitfor( $harm );
428
	wait(0.2);
429
	$harm.useactorweapon( "EnterpriseDatapad" );
430
	$harm.anim( "ent-datapad-use" );
431
	wait(2);
432
	$harm.walkto("$harm_eng_nav12", "walk" );
433
	waitfor( $harm );
434
	$harm.walkto("$harm_eng_nav13", "walk" );
435
	waitfor( $harm );
436
	$harm.walkto("$harm_eng_nav14", "walk" );
437
	waitfor( $harm );
438
	$harm.useactorweapon( "none" );
439
	$harm.anim( "idle" );
440
	wait(0.1);
441
	$harm.useactorweapon( "Tricorder" );
442
	$harm.anim( "tricorder_use_loop" );
443
	wait(5);
444
	$harm.useactorweapon( "none" );
445
	$harm.anim( "idle" );
446
	$harm.turntoangle( 135 );
447
 
448
	thread eng_harm();
449
 
450
}
451
 
452
void eng_mac()
453
{
454
	$mac.walkto("$mac_eng_nav1", "walk" );
455
	waitfor( $mac );
456
	$mac.walkto("$mac_eng_nav2", "walk" );
457
	waitfor( $mac );
458
	$mac.walkto("$mac_eng_nav3", "walk" );
459
	waitfor( $mac );
460
	$mac.walkto("$mac_eng_nav4", "walk" );
461
	waitfor( $mac );
462
	$mac.walkto("$mac_eng_nav5", "walk" );
463
	waitfor( $mac );
464
	$mac.walkto("$mac_eng_nav6", "walk" );
465
	waitfor( $mac );
466
	$mac.walkto("$mac_eng_nav7", "walk" );
467
	waitfor( $mac );
468
	$mac.useactorweapon( "Tricorder" );
469
	$mac.anim( "tricorder_use_loop" );
470
	wait(4);
471
	$mac.useactorweapon( "none" );
472
	$mac.anim( "idle" );
473
	$mac.walkto("$mac_eng_nav8", "walk" );
474
	waitfor( $mac );
475
	$mac.walkto("$mac_eng_nav9", "walk" );
476
	waitfor( $mac );
477
	$mac.walkto("$mac_eng_nav10", "walk" );
478
	waitfor( $mac );
479
	$mac.walkto("$mac_eng_nav11", "walk" );
480
	waitfor( $mac );
481
	$mac.useactorweapon( "Tricorder" );
482
	$mac.anim( "tricorder_use_loop" );
483
	wait(3);
484
	$mac.useactorweapon( "none" );
485
	$mac.anim( "idle" );
486
	$mac.walkto("$mac_eng_nav12", "walk" );
487
	waitfor( $mac );
488
	$mac.walkto("$mac_eng_nav13", "walk" );
489
	waitfor( $mac );
490
	$mac.walkto("$mac_eng_nav14", "walk" );
491
	waitfor( $mac );
492
	$mac.walkto("$mac_eng_nav15", "walk" );
493
	waitfor( $mac );
494
	$mac.useactorweapon( "Tricorder" );
495
	$mac.anim( "tricorder_use_loop" );
496
	wait(3);
497
	$mac.useactorweapon( "none" );
498
	$mac.anim( "idle" );
499
 
500
	thread eng_mac();
501
}
502
 
503
void closed_door_sound()
504
{
505
	$player.playsound( "sound/doors/door_locked.wav");
506
}
507
 
508
void closed_door_sound_2()
509
{
510
	$player.playsound( "sound/environment/computer/lcars_no.wav");
511
}
512
//===================================================================
513
//	Cargo Bay 4
514
//===================================================================
515
 
516
void cpanel()
517
{
518
//-------------------------------------------------------------------
519
//	This moves the panels covering the power re-routing controls
520
//-------------------------------------------------------------------
521
	$cpanel1.moveeast(2);
522
	$cpanel2.moveeast(2);
523
	$cpanel3.moveeast(2);
524
 
525
 
526
	wait(1);
527
 
528
	$cpanel1.movenorth(73);
529
	$cpanel1.time(1.5);
530
	$cpanel2.movesouth(75);
531
	$cpanel2.time(1.5);
532
	$cpanel3.movenorth(73);
533
	$cpanel3.time(1.5);
534
 
535
	$player.loopsound( "sound/doors/lrg_01_start.wav" );
536
	wait(2);
537
	$player.stoploopsound();
538
	$player.playsound( "sound/doors/lrg_01_stop.wav" );
539
}
540
 
541
void panel()
542
{
543
 
544
//-------------------------------------------------------------------
545
//	This changes the colour of the power re-routing panel and plays
546
//	the power-up and power-down sounds
547
//-------------------------------------------------------------------
548
 
549
	$cargopanelr.hide();
550
	$cargopanelg.show();
551
	$player.playsound("sound/ships/forever/for_poweron.wav");
552
 
553
	wait(3);
554
 
555
	$cargopanelg.hide();
556
	$cargopanelr.show();
557
	$player.playsound("sound/environment/computer/lcars_error.wav");
558
 
559
	wait(1);
560
 
561
	$cargopanelr.hide();
562
	$cargopanelg.show();
563
	$player.playsound("sound/ships/forever/for_poweron.wav");
564
 
565
	wait(3);
566
 
567
	$cargopanelg.hide();
568
	$cargopanelr.show();
569
	$player.playsound("sound/environment/computer/lcars_error.wav");
570
 
571
	wait(1);
572
 
573
	$cargopanelr.hide();
574
	$cargopanelg.show();
575
	$player.playsound("sound/environment/computer/lcars_yes.wav");
576
 
577
	wait(1);
578
 
579
	music( "success" );
580
 
581
	wait(1);
582
 
583
	$jdoorpanel1.movenorth(2);
584
 
585
	wait(2);
586
 
587
	$jdoorpanel1.moveup(70);
588
 
589
	$cargotubedoor.unlock();
590
	$jdoorpanel1.playsound("sound/ships/forever/for_floorhatch.wav");
591
}
592
 
593
//==========================================================================
594
//	The Secret
595
//==========================================================================
596
 
597
void secretopen()
598
{
599
	$secret_locked.nottriggerable();
600
	$secretdoor.unlock();
601
	$secret_red.hide();
602
	$secret_green.show();
603
}
604
 
605
void secretprint()
606
{
607
      centerprint("Secret Area!");
608
}
609
 
610
void secret()
611
{
612
	$bob.ai_off();
613
	$phil.ai_off();
614
	$bob.playdialog("localization/sound/dialog/map03/bob/secret.mp3",1,10000,0);
615
	waitfordialog($bob);
616
	$phil.playdialog("localization/sound/dialog/map03/phil/secret.mp3",1,10000,0);
617
    waitfordialog($phil);
618
	wait(15);
619
	$bob.walkto("$nav2");
620
	wait(0.7);
621
	$phil.walkto("$nav2");
622
}
623
 
624
//===========================================================================
625
//	Main Computer Control Room
626
//===========================================================================
627
 
628
//---------------------------------------------------------------------------
629
//	Tells the player you've found what your looking for
630
//---------------------------------------------------------------------------
631
 
632
void comp_found()
633
{
634
	$illia.playdialog("localization/sound/dialog/map03/Illia/maincomputer.mp3",1,10000,0);//Main Computer Control.
635
	waitfordialog( $illia );
636
	wait(1);
637
	$illia.playdialog("localization/sound/dialog/map03/Illia/perfect.mp3",1,10000,0);//Perfect.
638
	waitfordialog( $illia );
639
	wait(1);
640
}
641
 
642
//---------------------------------------------------------------------------
643
//	Activates the trap
644
//---------------------------------------------------------------------------
645
 
646
void gas1()
647
{
648
	$gas3.show();
649
	$gas4.show();
650
	$gas5.show();
651
	$gas6.show();
652
	$jcomdoor.close();
653
	$jcomdoor.lock();
654
	$engconr.playsound( "sound/environment/computer/access_denied.wav");
655
	$player.loopsound( "sound/redalert.mp3", .4, 512 );
656
	$hurt1.triggerable();
657
	$comroomdoor.close();
658
	$comroomdoor.lock();
659
	$test6.remove(); //So that the player cannot initiate com_cin
660
}
661
 
662
//---------------------------------------------------------------------------
663
//	Red Alert Setup
664
//---------------------------------------------------------------------------
665
 
666
void redalert()
667
{
668
	while( 1 ) {
669
		$world.light_fade( "redalert3", .85, .4 );
670
		wait( .7 );
671
		$player.playsound("sound/redalert.mp3", 1, 1, 11111);
672
		$world.light_fade( "redalert3", .2, .6 );
673
		wait( 1.8 );
674
	}
675
 
676
}
677
 
678
//-------------------------------------------------------------------------
679
// Move the control panels in the computer room
680
//-------------------------------------------------------------------------
681
 
682
void enviromentalcontrols()
683
{
684
	$environmental.moveeast(17);
685
}
686
 
687
void maincomputercontrols()
688
{
689
	$maincomputercontrols.movewest(17);
690
}
691
 
692
void compcontrolsa()
693
{
694
	$computera.moveeast(17);
695
}
696
 
697
void compcontrolsb()
698
{
699
	$computerb.movewest(17);
700
}
701
 
702
//===========================================================================
703
//	Cinematics
704
//===========================================================================
705
 
706
void eng_cin()
707
{
708
 
709
	//---------------------------------------------------------------------------
710
	//	The sequence stopping you from entering engineering
711
	//---------------------------------------------------------------------------
712
	freezeplayer();
713
	cinematic();
714
 
715
	wait(1);
716
 
717
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
718
 
719
	wait(2);
720
 
721
	letterbox ( .1 );
722
 
723
	wait( .05 );
724
 
725
	$player.warp( '277 2667 -254' );
726
 
727
	$mainengdoor.close();
728
	$cam1.follow( $map3_cam1 );
729
	$cam1.cut();
730
	wait( .5);
731
	cuecamera($cam1);
732
	wait(0.5);
733
 
734
	skipthread("skip_eng_cin");
735
 
736
	cam_fadein( 3, 0, 0, 0, 1, 0 );
737
 
738
	$illia.solid();
739
	$illia.show();
740
	$illia.anim( "idle" );
741
	$illia.useactorweapon( "none" );
742
 
743
	wait(24);
744
 
745
	$illia.walkto("$illia_eng_nav1");
746
	waitfor( $illia );
747
	$illia.walkto("$illia_eng_nav2");
748
	waitfor( $illia );
749
	$moya.headwatchtarget( "illia" , 7 );
750
	$illia.walkto("$illia_eng_nav3");
751
	waitfor( $illia );
752
	$illia.walkto("$illia_eng_nav4");
753
	$illia.walkto("$illia_eng_nav5");
754
 
755
	wait(0.1);
756
 
757
	$moya.anim( "idle" );
758
	$moya.useactorweapon( "none" );
759
 
760
	$moya.walkto("$moya_eng_nav1");
761
	waitfor( $moya );
762
	$moya.walkto("$moya_eng_nav2");
763
	waitfor( $moya );
764
	$moya.walkto("$moya_eng_nav3");
765
	waitfor( $moya );
766
 
767
	wait(0.5);
768
 
769
	$moya.playdialog("localization/sound/dialog/map03/moya/sorry.mp3", 1, 10000, 0);// I'm Sorry Ms Ericsson.
770
	waitfordialog( $moya );
771
	$moya.playdialog("localization/sound/dialog/map03/moya/authorized.mp3", 1, 10000, 0);// Only Authorised Personnel May Enter Engineering.
772
	waitfordialog( $moya );
773
 
774
	wait(1);
775
 
776
	$illia.walkto("illia_eng_nav_return");
777
 
778
	wait(1);
779
 
780
	$mainengdoor.close();
781
 
782
	wait(1);
783
 
784
	thread skip_eng_cin();
785
}
786
 
787
void skip_eng_cin()
788
{
789
	killthread("eng_cin");
790
 
791
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
792
	wait(1);
793
 
794
	$moya.walkto("$moya_eng_nav3");
795
	waitfor( $moya );
796
 
797
	$illia.notsolid();
798
	$illia.hide();
799
	$player.warp( '-27 1655 -254');
800
	$moya.useactorweapon( "EnterpriseDatapad" );
801
	$moya.anim( "ent-datapad-use" );
802
	$moya.headwatchtarget( "none" , 7 );
803
 
804
	wait(1);
805
 
806
	noncinematic();
807
	clearletterbox( .1 );
808
	releaseplayer();
809
	cueplayer();
810
 
811
 
812
	wait(0.5);
813
 
814
	cam_fadein( 1, 0, 0, 0, 1, 0 );
815
 
816
	$player.missionobjective( 1 );
817
	//Make the mission objective appear
818
	$player.setobjectivefailed( "gettoengineering", 1 );
819
	$player.setobjectiveshow( "sabotageengines", 1 );
820
}
821
 
822
void com_cin()
823
{
824
 
825
	//---------------------------------------------------------------------------
826
	//	The sequence where you get caught messing with the engines.......Doh!
827
	//---------------------------------------------------------------------------
828
 
829
	freezeplayer();
830
	cinematic();
831
 
832
	wait(1);
833
 
834
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
835
 
836
	wait(2);
837
 
838
	letterbox ( .1 );
839
 
840
	wait( .05 );
841
 
842
	$cam3.follow($map3_cam3);
843
	$cam3.cut();
844
	wait( .5);
845
	cuecamera($cam3);
846
 
847
	skipthread("com_cin_end");
848
 
849
	$bud.notsolid();
850
	$bud.hide();
851
	$buds_case.hide();
852
	$buds_case.notsolid();
853
	$mac.notsolid();
854
	$mac.hide();
855
	$illia_prisoner.show();
856
	$illia_prisoner.solid();
857
	$illia_prisoner.anim("cin-m8_situp");
858
	$comroomdoor.unlock();
859
 
860
	wait(1);
861
 
862
	cam_fadein( 1, 0, 0, 0, 1, 0 );
863
 
864
	wait(1);
865
 
866
	$illia_prisoner.playdialog("localization/sound/dialog/map03/Illia/thesabotage.mp3",1,10000,0);// Sabotaging The Atlantic Was No Big Deal.
867
	waitfordialog( $illia_prisoner );
868
 
869
	wait(01);
870
 
871
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
872
	$player.notsolid();
873
	$player.hide();
874
	$illia2.show();
875
	$illia2.solid();
876
	$moya2.show();
877
	$moya2.solid();
878
	$jcomdoor.close();
879
	$jcomdoor.lock();
880
 
881
	$moya2.useactorweapon( "EnterpriseDatapad" );
882
	$moya2.anim( "ent-datapad-use" );
883
 
884
	$illia2.useactorweapon( "Tricorder" );
885
	$illia2.anim( "tricorder_use_loop" );
886
 
887
	$cam2.follow( $map3_cam2 );
888
	$cam2.cut();
889
	wait(0.5);
890
	cuecamera ( $cam2 );
891
	cam_fadein( 1, 0, 0, 0, 1, 0 );
892
 
893
	wait(7);
894
 
895
	$illia2.useactorweapon( "none" );
896
	$illia2.anim( "idle" );
897
 
898
	$illia2.turntoangle( 125 );
899
	$illia2.walkto("$illia2_com_nav1", "walk" );
900
	waitfor( $illia2 );
901
	$illia2.walkto("$illia2_com_nav2", "walk" );
902
	waitfor( $illia2 );
903
	$illia2.walkto("$illia2_com_nav3", "walk" );
904
	waitfor( $illia2 );
905
 
906
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
907
 
908
	wait(2);
909
	$cam3.follow($map3_cam3);
910
	$cam3.cut();
911
	wait(0.5);
912
	cuecamera($cam3);
913
	cam_fadein( 1, 0, 0, 0, 1, 0 );
914
 
915
	$illia_prisoner.playdialog("localization/sound/dialog/map03/Illia/virus.mp3",1,10000,0);//I Inserted a Virus Into The Main Compute That Was To Stop Every Attempt At Entering Warp For The Next Few Days.
916
	waitfordialog( $illia_prisoner );
917
 
918
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
919
 
920
	wait(2);
921
	$illia2.warp( '-921 1440 -56' );
922
	$cam4.follow( $map3_cam4 );
923
	$cam4.cut();
924
	wait(1.5);
925
	cuecamera ( $cam4 );
926
 
927
	cam_fadein( 1, 0, 0, 0, 1, 0 );
928
 
929
	wait(2);
930
 
931
	$illia2.turntoangle( 90 );
932
	$illia2.walkto("$illia2_eng_nav1", "walk" );
933
	waitfor( $illia2 );
934
	$illia2.walkto("$illia2_eng_nav2", "walk" );
935
	waitfor( $illia2 );
936
	$illia2.walkto("$illia2_eng_nav3", "walk" );
937
	waitfor( $illia2 );
938
	$illia2.useactorweapon( "Tricorder" );
939
	$illia2.anim( "tricorder_use_loop" );
940
 
941
	wait(3);
942
 
943
	$illia2.useactorweapon( "none" );
944
	$illia2.anim( "idle" );
945
 
946
	$illia2.walkto("$illia2_eng_nav4", "walk" );
947
	waitfor( $illia2 );
948
	$illia2.walkto("$illia2_eng_nav5", "walk" );
949
	waitfor( $illia2 );
950
 
951
	$illia2.useactorweapon( "Tricorder" );
952
	$illia2.anim( "tricorder_use_loop" );
953
 
954
	wait(2);
955
 
956
	$illia2.playdialog("localization/sound/dialog/map03/Illia/complete.mp3",1,10000,0);//When I Was Finished With My Small Manipulation Things Began To Take A Turn For The Worse.
957
	waitfordialog($illia2);
958
	wait(4);
959
 
960
	$eng_lift.time(3);
961
	$eng_lift.moveup(201);
962
	$camnode_map3_cam4_6.playsound("sound/ships/enterprise/ent_lift01.wav",1,10000,0);
963
	$eng_lift.playsound("sound/ships/enterprise/ent_lift01.wav",1,10000,0);
964
	$console1.playsound("sound/ships/enterprise/ent_lift01.wav",1,10000,0);
965
	$cam4.playsound("sound/ships/enterprise/ent_lift01.wav",1,10000,0);
966
	waitfor( $eng_lift );
967
	$camnode_map3_cam4_6.playsound("sound/ships/enterprise/ent_lift01_stop.wav",1,10000,0);
968
	$console1.playsound("sound/ships/enterprise/ent_lift01_stop.wav",1,10000,0);
969
	$eng_lift.playsound("sound/ships/enterprise/ent_lift01_stop.wav",1,10000,0);
970
	$cam4.playsound("sound/ships/enterprise/ent_lift01_stop.wav",1,10000,0);
971
 
972
 
973
 
974
	$illia2.useactorweapon( "none" );
975
	$illia2.anim( "idle" );
976
 
977
	$moya2.useactorweapon( "none" );
978
	$moya2.anim( "idle" );
979
 
980
	$moya2.headwatchtarget( "core" , 7 );
981
 
982
	$moya2.walkto("$moya2_eng_nav1");
983
	waitfor( $moya2 );
984
 
985
	$moya2.headwatchtarget( "player" , 7 );
986
 
987
	wait(1);
988
 
989
	$moya2.playdialog("localization/sound/dialog/map03/Moya/msericsson.mp3",1,10000,0);// Ms Ericsson?
990
	waitfordialog( $moya2 );
991
	wait(1);
992
	$moya2.playdialog("localization/sound/dialog/map03/Moya/doing.mp3",1,10000,0);// What Are You Doing?
993
	waitfordialog( $moya2 );
994
	wait(1);
995
	//--- Ensign Moya taps his comm badge and calls security
996
	$moya2.anim( "tap_comm" );
997
	waitforanimation( $moya2, "tap_comm" );
998
	$moya2.anim ("idle");
999
	$moya2.playdialog("localization/sound/dialog/map03/Moya/security.mp3",1,10000,0);// I Need A Security Team In Engineering.
1000
	waitfordialog( $moya2 );
1001
 
1002
	wait(0.5);
1003
 
1004
	$console1.loopsound( "sound/redalert.mp3" );
1005
	$console2.loopsound( "sound/redalert.mp3" );
1006
	$camnode_map3_cam4_9.loopsound( "sound/redalert.mp3" );
1007
	$camnode_map3_cam4_8.loopsound( "sound/redalert.mp3" );
1008
 
1009
	$alert_green.hide();
1010
	$alert_red.show();
1011
	$engcong.hide();
1012
	$engconr.show();
1013
 
1014
 
1015
	thread redalert();
1016
	$panel_alert_on.show();
1017
	$panel_alert_off.hide();
1018
 
1019
	$illia2.useactorweapon( "Tricorder" );
1020
	$illia2.anim( "tricorder_use_loop" );
1021
 
1022
	$jcomdoor.unlock();
1023
 
1024
	wait(2);
1025
 
1026
	$eng_field.solid();
1027
	$eng_field.show();
1028
	$eng_field.solid();
1029
	$eng_field.playsound( "sound/ships/borg/borg_forcefield_on.wav", 1, 1, 11111 );
1030
	$engdoor1.solid();
1031
	$engdoor1.show();
1032
	$engdoor1.time( 8 );
1033
	$engdoor1.moveUp( 176 );
1034
	eng_door=1;
1035
 
1036
	$player.playsound("localization/sound/dialog/map03/Computer/shutdown_init.mp3", 1, 1, 11111); //System lockdown initialized.
1037
	$eng_field.loopsound( "sound/ships/enterprise/ent_forcefield.wav", .7, 30 );
1038
	wait(2);
1039
 
1040
	com_cin_end();
1041
}
1042
 
1043
void com_cin_end()
1044
{
1045
	killthread("com_cin");
1046
 
1047
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
1048
	wait(2);
1049
 
1050
	$eng_field.solid();
1051
	$eng_field.show();
1052
	$eng_field.solid();
1053
 
1054
	if(eng_door==0)
1055
	{
1056
		$engdoor1.solid();
1057
		$engdoor1.show();
1058
		$engdoor1.time( .1 );
1059
		$engdoor1.moveUp( 176 );
1060
	}
1061
 
1062
	$player.warp( '-1148 1740 -56' );
1063
	$illia2.notsolid();
1064
	$illia2.hide();
1065
	$player.solid();
1066
	$player.show();
1067
	$eng_door3.lock();
1068
	$jack.solid();
1069
	$jack.show();
1070
	$jill.solid();
1071
	$jill.show();
1072
 
1073
 
1074
	wait(2);
1075
 
1076
	noncinematic();
1077
	clearletterbox( .1 );
1078
	releaseplayer();
1079
	cueplayer();
1080
	$player.turntoangle( 90 );
1081
	cam_fadein( 1, 0, 0, 0, 1, 0 );
1082
	//Make the objective complete
1083
	$player.setobjectivecomplete( "sabotageengines", 1 );
1084
	$player.setobjectiveshow("gettocargobay", 1);
1085
	$player.missionobjective(1);
1086
	$near_end.triggerable();
1087
	forcemusic( "action" );
1088
	//-------------------------------------------------------------------------
1089
	// Activates Red Alert and locks and unlocks several doors
1090
	//-------------------------------------------------------------------------
1091
 
1092
	$jdoor2.unlock();
1093
	$secretdoor.lock();
1094
	$secret_red.show();
1095
	$secret_green.hide();
1096
	$jdoor1.lock();
1097
	$jdoor1_red.show();
1098
	$jdoor1_green.hide();
1099
	$jdoor2g.show();
1100
	$jdoor2r.hide();
1101
	$jdoor1_locked.triggerable();
1102
	$jdoor2_locked.nottriggerable();
1103
	$secret_locked.triggerable();
1104
	$secrettrigger.nottriggerable();
1105
	$cargotubedoor.lock();
1106
	$jdoorpanel1.movesouth(3);
1107
	$exitdoor.unlock();
1108
	$exitdoor_sound.nottriggerable();
1109
 
1110
 
1111
	//-------------------------------------------------------------------------
1112
	// Close Off Access To Engineering
1113
	//-------------------------------------------------------------------------
1114
 
1115
	$mainengdoor.lock();
1116
	$mainengdoor2.lock();
1117
	$cargodoors.lock();
1118
	$cargodoors_sound.triggerable();
1119
	$exitdoor.unlock();
1120
 
1121
	$roof_hatch.hide();
1122
	$roof_hatch.notsolid();
1123
	$roof_hatch_floor.show();
1124
	$roof_hatch_floor.solid();
1125
	$roof_hatch_cover.show();
1126
	$roof_hatch_cover.solid();
1127
 
1128
	wait(2);
1129
 
1130
	$jdoorpanel1.movedown(70);
1131
	$cargobaydoor.lock();
1132
 
1133
	// Make security team attack player
1134
	AIShowGroup    ( 666, "Federation" );
1135
	$warn.triggerable();
1136
}
1137
 
1138
void warning()
1139
{
1140
	$security2.playdialog("localization/sound/dialog/map03/lee/shoot.mp3",  1, 10000, 0);
1141
	waitfordialog($security2);
1142
	$attack.triggerable();
1143
}
1144
 
1145
void attack_p()
1146
{
1147
	CommandToGroup ( 666 , "groupactortype" , "enemy" , "");
1148
	CommandToGroup ( 666 , "visiondistance" , "20000" , "" );
1149
	CommandToGroup ( 666 , "fov" , "360" , "" );
1150
	CommandToGroup ( 666 , "attack" , "$player" , "" );
1151
	$security1.show();
1152
	$security1.solid();
1153
	$security2.show();
1154
	$security2.solid();
1155
	$security1.ai_on();
1156
	$security2.ai_on();
1157
	//Make security team visible
1158
	$security1.attack($player);
1159
	$security2.attack($player);
1160
}
1161