Subversion-Projekte sthq.gbs

Revision

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