Subversion-Projekte sthq.gbs

Revision

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