Subversion-Projekte sthq.gbs

Revision

Revision 880 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
248 argyle 1
//-----------------------------------------------------------------
494 lars 2
//  EF2 Level Script File
248 argyle 3
//
494 lars 4
//  Level:        	map4
858 Avenger 5
//  Script By:    	Nemo22, Argyle, TickNSwisted, LTiefland, Avenger
494 lars 6
//  Geometry By:  	Argyle, TickNSwisted
880 lars 7
//  Created on:	01/04/2004
8
// Last Edited on:  $Date: 2007-06-20 22:47:49 +0200 (Mi, 20 Jun 2007) $
9
// Last Edited by:	$Author: avenger $
248 argyle 10
//-----------------------------------------------------------------
162 argyle 11
 
12
 
434 lars 13
 
14
float cadet1_pos, crew1_pos, lift_a_height, lift_b_height, lift_a_pos, lift_b_pos, player_pos;
15
 
248 argyle 16
void main();
681 argyle 17
 
18
void lock_lab_entry();
644 lars 19
void initArchetypes();
248 argyle 20
void init();
21
void trigger_shower_door();
22
void wall_exp();
23
void redalert();
24
void kraftfeld();
25
void poison_gas();
429 argyle 26
void before_lab();
27
void inside_lab();
600 TickNSwist 28
void secret_button();
429 argyle 29
void koi_swim();
434 lars 30
void move_lifta();
31
void move_liftb();
480 lars 32
void beamout_puzzle();
33
void beamout();
858 Avenger 34
void closed_door_sound();
35
void closed_door_sound_2();
36
void puzzleUsed();
37
void puzzleReset();
38
void puzzleSolved();
248 argyle 39
 
40
#include "maps/global_scripts/global_common.scr"
41
#include "maps/global_scripts/global_math.scr"
858 Avenger 42
#include "maps/global_scripts/global_acceleratedMovement.scr"
43
#include "maps/global_scripts/global_playerLoadout.scr"
44
#include "maps/global_scripts/global_debugUtils.scr"
45
#include "maps/global_scripts/global_tricorderBase.scr"
46
#include "maps/global_scripts/global_tricorderKeypad.scr"
47
#include "maps/global_scripts/global_archetype.scr"
444 argyle 48
#include "maps/attackplayer.scr"
248 argyle 49
 
434 lars 50
void move_lifta()
51
{
52
	wait(3);
53
	$trigger_lift_a_low.nottriggerable();
54
	$trigger_lift_a_up.nottriggerable();
55
	if (crew1_pos==0)
56
	{
57
		$lift_a.moveup(lift_a_height);
435 lars 58
		lift_a_pos=2;
434 lars 59
		waitfor($lift_a);
435 lars 60
		lift_a_pos=1;
434 lars 61
		$crew1.walkto("$lift_a_nav2");
62
		waitfor($crew1);
63
		wait(3);
64
		$crew1.walkto("$lift_a_nav3");
65
		waitfor($crew1);
66
		$lift_a.movedown(lift_a_height);
435 lars 67
		lift_a_pos=2;
434 lars 68
		waitfor($lift_a);
435 lars 69
		lift_a_pos=0;
434 lars 70
		crew1_pos=1;
71
	}
72
	else
73
	{
74
		if (lift_a_pos==0)
75
		{
76
			wait(3);
77
			$lift_a.moveup(lift_a_height);
78
			waitfor($lift_a);
79
			lift_a_pos=1;
80
		}
81
		else
82
		{
83
			wait(3);
84
			$lift_a.movedown(lift_a_height);
85
			waitfor($lift_a);
86
			lift_a_pos=0;
87
		}
88
	}
89
	wait(10);
90
	$trigger_lift_a_low.triggerable();
91
	$trigger_lift_a_up.triggerable();
92
}
93
 
94
void move_liftb()
95
{
96
	$trigger_lift_b_low.nottriggerable();
97
	$trigger_lift_b_up.nottriggerable();
98
	if (cadet1_pos==1)
99
	{
100
		$lift_b.moveup(lift_b_height);
435 lars 101
		lift_b_pos=2;
434 lars 102
		wait(3);
435 lars 103
		lift_b_pos=1;
434 lars 104
		$cadet1.walkto("$lift_b_nav2");
105
		waitfor($cadet1);
106
		$lift_b.movedown(lift_b_height);
435 lars 107
		lift_b_pos=2;
434 lars 108
		waitfor($lift_b);
435 lars 109
		lift_b_pos=0;
434 lars 110
		$cadet1.walkto("$lift_b_nav3");
111
		waitfor($cadet1);
112
		$cadet1.walkto("$lift_b_nav4");
113
		waitfor($cadet1);
114
		cadet1_pos=0;
115
	}
116
	else
117
	{
118
		if (lift_b_pos==0)
119
		{
120
			wait(3);
121
			$lift_b.moveup(lift_b_height);
122
			waitfor($lift_b);
123
			lift_b_pos=1;
124
		}
125
		else
126
		{
127
			wait(3);
128
			$lift_b.movedown(lift_b_height);
129
			waitfor($lift_b);
130
			lift_b_pos=0;
131
		}
132
	}
133
	wait(10);
134
	$trigger_lift_b_low.triggerable();
135
	$trigger_lift_b_up.triggerable();
136
}
137
 
248 argyle 138
void main()
139
{
890 avenger 140
	waitforPlayer();//what the hell, it was missing
644 lars 141
	thread initArchetypes();
618 lars 142
	spawn("camera","targetname","cam1");
545 lars 143
	$end_trigger.nottriggerable();
248 argyle 144
	$player.give( "models/weapons/worldmodel-tricorder-STX.tik" );
858 Avenger 145
	$player.model( "char/hazardteam_jurot.tik" );
248 argyle 146
 
147
	thread init();
148
	thread redalert();
429 argyle 149
	koi_swim();
434 lars 150
 
151
	lift_a_height=80;
152
	lift_b_height=192;
153
	lift_a_pos=0;
154
	lift_b_pos=0;
155
	crew1_pos=0;
156
	cadet1_pos=1;
858 Avenger 157
 
158
	$xmas_door.lock();
159
	$7_door.lock();
160
 
248 argyle 161
}
162
 
429 argyle 163
 
164
void before_lab()
165
{
166
	$kraftfeld2.show();
846 lars 167
	$kraftfeld2.solid();
429 argyle 168
	triggerentity( $kraftfeld_sound2 );
681 argyle 169
	$kraftfeld2.playsound( "sound/ships/borg/borg_forcefield_on.wav", 1, 1, 11111 );
170
	$kraftfeld2.loopsound( "sound/ships/enterprise/ent_forcefield.wav", .7, 30 );
429 argyle 171
}
172
 
173
void inside_lab()
174
{
678 argyle 175
	//AIShowGroup    ( 666, "Federation" );
444 argyle 176
 
429 argyle 177
	$kraftfeld3.show();
846 lars 178
	$kraftfeld3.solid();
435 lars 179
	triggerentity( $kraftfeld_sound3 );
681 argyle 180
	$kraftfeld3.playsound( "sound/ships/borg/borg_forcefield_on.wav", 1, 1, 11111 );
181
	$kraftfeld3.loopsound( "sound/ships/enterprise/ent_forcefield.wav", .7, 30 );
182
 
183
 
431 argyle 184
	$lab_exit2.time( 1.5 );
429 argyle 185
	wait( .1 );
681 argyle 186
 
429 argyle 187
	$lab_exit2.moveUp( 120 );
431 argyle 188
	triggerentity( $lab_exit2_sound );
434 lars 189
 
444 argyle 190
	$lab_security1.ai_off();
191
	$lab_security2.ai_off();
454 lars 192
	$lab_security4.ai_off();
859 lars 193
	$lab_security3.ai_off();
434 lars 194
 
444 argyle 195
	wait( 0.5 );
434 lars 196
 
444 argyle 197
 
198
	$lab_security1.walkto( "$lab_security1_nav1", "run" );
199
	wait( 0.2 );
200
	$lab_security2.walkto( "$lab_security2_nav1", "run" );
201
	wait( 3 );
446 lars 202
	$lab_exit2.movedown( 120 );
203
	triggerentity( $lab_exit2_sound );
448 lars 204
 
444 argyle 205
	CommandToGroup ( 666 , "groupactortype" , "enemy" , "");
206
	CommandToGroup ( 666 , "visiondistance" , "4000" , "" );
207
	CommandToGroup ( 666 , "fov" , "360" , "" );
208
	CommandToGroup ( 666 , "attack" , "$player" , "" );
209
 
210
	$lab_security1.ai_on();
211
	$lab_security2.ai_on();
212
 
213
 
214
	wait(3);
215
 
216
	$lab_exit1.time( 1.5 );
217
	wait( .1 );
218
	$lab_exit1.moveUp( 120 );
219
 
448 lars 220
	wait( 0.5 );
221
 
454 lars 222
	$lab_security4.walkto( "$lab_security4_nav1", "run" );
448 lars 223
	wait( 0.2 );
859 lars 224
	$lab_security3.walkto( "$lab_security3_nav1", "run" );
448 lars 225
	wait( 3 );
226
	$lab_exit1.movedown( 120 );
227
 
444 argyle 228
	$lab_security4.ai_on();
859 lars 229
	$lab_security3.ai_on();
429 argyle 230
}
231
 
600 TickNSwist 232
void secret_button()
233
{
601 lars 234
	$obj_button01.time (1);
235
	$obj_button01.movenorth (2);
858 Avenger 236
 
237
	$xmas_door.unlock();
238
	$xmas_trigger.nottriggerable();
601 lars 239
}
429 argyle 240
 
241
void koi_swim()
242
{
494 lars 243
	wait(1);
244
	$koi1.anim( "idle" );
245
	$koi1.followpath( $koi1_path , "loop" , "normalangles" );
429 argyle 246
 
494 lars 247
	$koi2.anim( "idle" );
248
	$koi2.followpath( $koi2_path , "loop" , "normalangles" );
429 argyle 249
}
250
 
248 argyle 251
void init()
252
{
678 argyle 253
	//--hide forcefield
494 lars 254
	$kraftfeld.hide();
255
	$kraftfeld2.hide();
256
	$kraftfeld3.hide();
846 lars 257
	$kraftfeld.notsolid();
258
	$kraftfeld2.notsolid();
259
	$kraftfeld3.notsolid();
494 lars 260
	$kraft_feld_poison.hide();
261
	$kraft_feld_poison.notsolid();
444 argyle 262
 
494 lars 263
	//--Showergirl SetUp
264
	$showergirl1.ai_off();
265
	$showergirl1.anim("conv-gesture1");
858 Avenger 266
	$shower_door_trigger.nottriggerable();
444 argyle 267
 
678 argyle 268
	//--Explosion trigger
494 lars 269
	$trigger1.nottriggerable();
444 argyle 270
 
678 argyle 271
	//--Door to bathroom
494 lars 272
	$shower_door_left.time( .1 );
273
	$shower_door_right.time( .1 );
274
	wait( .1 );
275
	$shower_door_left.moveWest( 40 );
276
	$shower_door_right.moveEast( 40 );
444 argyle 277
 
494 lars 278
	//--Gas im Korridor
279
	$gas.hide();
444 argyle 280
 
281
 
494 lars 282
	// Security Team
444 argyle 283
 
494 lars 284
	$lab_security1.setgroupid ( 666 );
285
	$lab_security2.setgroupid ( 666 );
444 argyle 286
 
494 lars 287
	$lab_security4.setgroupid ( 666 );
859 lars 288
	$lab_security3.setgroupid ( 666 );
444 argyle 289
 
290
 
681 argyle 291
	AIHideGroup    ( 666 );
444 argyle 292
 
494 lars 293
	// Beamout sequence
890 avenger 294
if(doesEntityExist($illia_beamout)){
480 lars 295
	$illia_beamout.hide();
296
	$illia_beamout.notsolid();
297
	$illia_beamout.ai_off();
298
	$illia_beamout.pushable(0);
890 avenger 299
}
300
 
480 lars 301
	spawn ( "Camera" , "targetname" , "cam1" );
496 lars 302
	//Take away weapons from illia!
890 avenger 303
if(doesEntityExist($illia_beamout)){
496 lars 304
	$illia_beamout.removeactorweapon ( "CompressionRifle" );
305
	$illia_beamout.removeactorweapon ( "AssaultRifle" );
306
	$illia_beamout.removeactorweapon ( "CompressionRifleEnhanced" );
890 avenger 307
}
494 lars 308
	//Take away weapons from player!
309
	//Only tricorder remains in place!
310
	$player.take ( "models/weapons/worldmodel-compressionrifle.tik" );
311
	$player.take ( "models/weapons/worldmodel-fieldassaultrifle.tik" );
312
	$player.take ( "models/weapons/worldmodel-burstrifle.tik" );
313
	$player.take ( "models/weapons/worldmodel-attrex-rifle.tik" );
314
	$player.take ( "models/weapons/worldmodel-compressionrifle.tik" );
315
	$player.take ( "models/weapons/worldmodel-phaser-STX.tik" );
316
 
248 argyle 317
}
318
 
162 argyle 319
void trigger_shower_door()
320
{
494 lars 321
	$shower_door_left.time( .35 );
322
	$shower_door_right.time( .35 );
323
	wait( .1 );
324
	$shower_door_left.playsound( "sound/doors/forever_door1.wav" );
325
	$shower_door_left.moveEast( 40 );
326
	$shower_door_right.moveWest( 40 );
858 Avenger 327
	wait( 3 );
328
	$shower_door_trigger.triggerable();
162 argyle 329
}
248 argyle 330
 
331
///////////////////////////
332
//Wand fliegt in die Luft//
333
///////////////////////////
334
void wall_exp()
162 argyle 335
{
494 lars 336
	//$wall_puzzle.nottriggerable();
337
	triggerentity( $blabla_tut );
338
	triggerentity( $blabla_tut_overload );
339
	wait( 3.8 );
340
	$trigger1.triggerable();
341
	triggerentity( $trigger );
342
	$console.playsound( "sound/impact/explosion/expl_inside4.wav" );
343
	triggerentity( $console_exp );
344
	$player.earthquake( .75, 1.4 );
345
	$wall_hide.hide();
346
	wait( .2 );
347
	$console.playsound( "sound/impact/explosion/expl_inside3.wav" );
348
	triggerentity( $console_exp1 );
349
	$console.hide();
350
	$console.notsolid();
248 argyle 351
}
162 argyle 352
 
248 argyle 353
/////////////////////////////////////////////////////
354
/////////////////////Roter Alarm/////////////////////
355
//Wenn möglich nur target_speaker in den Korridoren//
356
/////////////////////////////////////////////////////
357
void redalert()
358
{
494 lars 359
	$world.light_fade( "redalert", .85, .4 );
360
	$player.playsound( "sound/redalert.mp3" );
361
	wait( .7 );
362
	$world.light_fade( "redalert", .2, .6 );
363
	wait( 1.8 );
364
	thread redalert();
248 argyle 365
}
162 argyle 366
 
248 argyle 367
////////////////////////////////////////
368
//Kraffelder + Sound schalten sich ein//
369
////////////////////////////////////////
370
void kraftfeld()
371
{
494 lars 372
	$gas.show();
373
	$kraftfeld.show();
846 lars 374
	$kraftfeld.solid();
494 lars 375
	triggerentity( $kraftfeld_sound );
681 argyle 376
	$kraftfeld.playsound( "sound/ships/borg/borg_forcefield_on.wav", 1, 1, 11111 );
377
	$kraftfeld.loopsound( "sound/ships/enterprise/ent_forcefield.wav", .7, 30 );
494 lars 378
	wait( 1 );
379
	$player.simpleplaydialog( "localization/sound/dialog/map04/computer/intruder.mp3", 1, 20000 ); //Lieutenant Munro, you have a visitor waiting for you in the main entrance.
380
	waitDialogLength( "localization/sound/dialog/map04/computer/intruder.mp3" );
381
	thread poison_gas();
382
	$player.simpleplaydialog( "localization/sound/dialog/map04/computer/gas.mp3", 1, 20000 ); //Lieutenant Munro, you have a visitor waiting for you in the main entrance.
383
	waitDialogLength( "localization/sound/dialog/map04/computer/gas.mp3" );
248 argyle 384
}
162 argyle 385
 
248 argyle 386
void poison_gas()
387
{
494 lars 388
	//////////////////////////////30 SEKUNDEN/////////////////////////////////////////
389
	/////////////////////////bis der Spieler stirbt///////////////////////////////////
390
	//Wenn er oder sie 100 Health hat.
391
	//"lebendesspielers", mir fiel nichts besseres ein!
392
	//Note:  Um den Timer zu verändern, kann man zwei Werte verändern.
393
	//		 Der erste Wert ist dazu da, um festzulegen, wie wiel Schaden
394
	//		 verursacht wird. Der zweite Wert ist dazu da, um festzulegen
395
	//		 wann der Spieler wieder verletzt wird.
396
	//HINWEIS: Wenn du nicht durch das Loch kommst, dann duck dich!
444 argyle 397
 
494 lars 398
	//First Get Initial Value of Chang's life
399
	float lebendesspielers;
400
	lebendesspielers = $player.gethealth();
444 argyle 401
 
494 lars 402
	//Now, continue looping until chang is dead.  If chang is saved
403
	//before he dies, then killthread MUST be called on this thread
404
	//to stop this counter
405
	while( lebendesspielers > 1.0 )
406
	{
407
		//Every iteration damage the player
408
		$player.hurt( 5 );
409
		lebendesspielers = $player.gethealth();
410
		//print ("end of cinematic thread life counter\n");
411
		//Check if chang is 'dead".  If he is, then fail the mission
412
		if ( lebendesspielers <= 1.0 )
413
		{
414
			wait( 1 );
415
			stuffcmd ( "kill\n" );
416
		}
417
		//Wait a specified interval before damaging again
418
		wait( 1.5 );
419
	}
248 argyle 420
}
162 argyle 421
 
248 argyle 422
void stop_poison_gas()
423
{
494 lars 424
	killthread( "poison_gas" );
425
	triggerentity( $kraft_feld_poison_sound );
426
	$kraft_feld_poison.show();
427
	$kraft_feld_poison.solid();
429 argyle 428
}
480 lars 429
 
430
void beamout_puzzle()
431
{
846 lars 432
	$player.simpleplaydialog("localization/sound/dialog/map04/Computer/energy.mp3",1,10000);
433
	waitdialoglength("localization/sound/dialog/map04/Computer/energy.mp3");
545 lars 434
	$end_trigger.triggerable();
480 lars 435
}
436
void beamout()
437
{
438
	freezeplayer();
617 lars 439
	cinematic();
678 argyle 440
        fakeplayer();
441
        $fakeplayer.warpto( "$beamout_nav" );
480 lars 442
	letterbox(.1);
443
	cam_fadeout( 2, 0, 0, 0, 1, 0 );
618 lars 444
	$cam1.follow($beamout_cam);
445
	cuecamera($cam1);
480 lars 446
	wait(.5);
617 lars 447
	cam_fadein( 0.5, 0, 0, 0, 1, 0 );
545 lars 448
        //Bring up a fake player model
449
        //Make the fakeplayer use the same weapon as you
450
        globalCommon_AiActorUseWeapon( $fakeplayer, "current" );
451
	$fakeplayer.displayEffect( "TransportOut", "Federation" );
480 lars 452
	wait(3);
617 lars 453
	cam_fadeout( 2, 0, 0, 0, 1, 0 );
480 lars 454
	clearletterbox(.1);
617 lars 455
	noncinematic();
545 lars 456
        removefakeplayer();
480 lars 457
	releaseplayer();
458
	cueplayer();
545 lars 459
	stuffcmd("map map5");
617 lars 460
	cam_fadein( 0.5, 0, 0, 0, 1, 0 );
461
}
644 lars 462
 
463
void initArchetypes()
464
{
465
 
466
      thread globalArchetype_Setup( $exp_console, "exp");
467
      thread globalArchetype_Setup( $beam_console, "beama");
468
 
890 avenger 469
	if(doesEntityExist($bails)){
470
		$bails.archetype ( "bails" );
471
	}
472
	if(doesEntityExist($jones)){
473
		$jones.archetype ( "jones" );
474
	}
475
	if(doesEntityExist($shaun)){
476
		$shaun.archetype ( "shaun" );
477
	}
478
	if(doesEntityExist($jenks)){
479
		$jenks.archetype ( "jenks" );
480
	}
481
	if(doesEntityExist($eddie)){
482
		$eddie.archetype ( "eddie" );
483
	}
484
	if(doesEntityExist($catrin)){
485
		$catrin.archetype ( "catrin" );
486
	}
644 lars 487
}
681 argyle 488
 
489
 
490
void lock_lab_entry()
491
{
492
   AIShowGroup    ( 666, "Federation" );
493
   $lab_entry.lock();
494
}
858 Avenger 495
 
496
void closed_door_sound()
497
{
498
	$player.playsound( "sound/doors/door_locked.wav");
499
}
500
 
501
void closed_door_sound_2()
502
{
503
	$player.playsound( "sound/environment/computer/lcars_no.wav");
504
}
505
 
506
//Secret Room Puzzle
507
 
508
void puzzleUsed()
509
{
510
	globalTricorderKeypad_SetType( "Starfleet" );
511
	globalTricorderKeypad_SetScannedCodeFlag( 0 );
512
	globalTricorderKeypad_SetSecretCode( 7, 9, 7, 9, 0, 0, 0, 0, 0 ); //4 digit code
513
	globalTricorderKeypad_Run( $secretRoomPuzzle, 100, 3);
514
}
515
 
516
void puzzleReset()
517
{
518
	$secretRoomPuzzle.puzzleobject_reset();
519
}
520
 
521
void puzzleSolved()
522
{
523
	$secretRoomPuzzle.playsound( "sound/ships/romulan/rom_beep_yes.wav", 0, 1 );
524
	$7_door.unlock();
525
	$7_trigger.nottriggerable();
526
	trigger( "$7_door" );
527
	$secretRoomPuzzle.remove(); //so that player doesn't have to keep re-entering the puzzle code
528
}