Subversion-Projekte sthq.gbs

Revision

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