Subversion-Projekte sthq.gbs

Revision

Revision 859 | Revision 862 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

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