Subversion-Projekte sthq.gbs

Revision

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