Subversion-Projekte sthq.gbs

Revision

Revision 859 | Zur aktuellen Revision | 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-04-08 23:58:18 +0200 (So, 08 Apr 2007) $
9
// Last Edited by:	$Author: lars $
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
{
644 lars 140
	thread initArchetypes();
618 lars 141
	spawn("camera","targetname","cam1");
545 lars 142
	$end_trigger.nottriggerable();
248 argyle 143
	$player.give( "models/weapons/worldmodel-tricorder-STX.tik" );
858 Avenger 144
	$player.model( "char/hazardteam_jurot.tik" );
248 argyle 145
 
146
	thread init();
147
	thread redalert();
429 argyle 148
	koi_swim();
434 lars 149
 
150
	lift_a_height=80;
151
	lift_b_height=192;
152
	lift_a_pos=0;
153
	lift_b_pos=0;
154
	crew1_pos=0;
155
	cadet1_pos=1;
858 Avenger 156
 
157
	$xmas_door.lock();
158
	$7_door.lock();
159
 
248 argyle 160
}
161
 
429 argyle 162
 
163
void before_lab()
164
{
165
	$kraftfeld2.show();
846 lars 166
	$kraftfeld2.solid();
429 argyle 167
	triggerentity( $kraftfeld_sound2 );
681 argyle 168
	$kraftfeld2.playsound( "sound/ships/borg/borg_forcefield_on.wav", 1, 1, 11111 );
169
	$kraftfeld2.loopsound( "sound/ships/enterprise/ent_forcefield.wav", .7, 30 );
429 argyle 170
}
171
 
172
void inside_lab()
173
{
678 argyle 174
	//AIShowGroup    ( 666, "Federation" );
444 argyle 175
 
429 argyle 176
	$kraftfeld3.show();
846 lars 177
	$kraftfeld3.solid();
435 lars 178
	triggerentity( $kraftfeld_sound3 );
681 argyle 179
	$kraftfeld3.playsound( "sound/ships/borg/borg_forcefield_on.wav", 1, 1, 11111 );
180
	$kraftfeld3.loopsound( "sound/ships/enterprise/ent_forcefield.wav", .7, 30 );
181
 
182
 
431 argyle 183
	$lab_exit2.time( 1.5 );
429 argyle 184
	wait( .1 );
681 argyle 185
 
429 argyle 186
	$lab_exit2.moveUp( 120 );
431 argyle 187
	triggerentity( $lab_exit2_sound );
434 lars 188
 
444 argyle 189
	$lab_security1.ai_off();
190
	$lab_security2.ai_off();
454 lars 191
	$lab_security4.ai_off();
859 lars 192
	$lab_security3.ai_off();
434 lars 193
 
444 argyle 194
	wait( 0.5 );
434 lars 195
 
444 argyle 196
 
197
	$lab_security1.walkto( "$lab_security1_nav1", "run" );
198
	wait( 0.2 );
199
	$lab_security2.walkto( "$lab_security2_nav1", "run" );
200
	wait( 3 );
446 lars 201
	$lab_exit2.movedown( 120 );
202
	triggerentity( $lab_exit2_sound );
448 lars 203
 
444 argyle 204
	CommandToGroup ( 666 , "groupactortype" , "enemy" , "");
205
	CommandToGroup ( 666 , "visiondistance" , "4000" , "" );
206
	CommandToGroup ( 666 , "fov" , "360" , "" );
207
	CommandToGroup ( 666 , "attack" , "$player" , "" );
208
 
209
	$lab_security1.ai_on();
210
	$lab_security2.ai_on();
211
 
212
 
213
	wait(3);
214
 
215
	$lab_exit1.time( 1.5 );
216
	wait( .1 );
217
	$lab_exit1.moveUp( 120 );
218
 
448 lars 219
	wait( 0.5 );
220
 
454 lars 221
	$lab_security4.walkto( "$lab_security4_nav1", "run" );
448 lars 222
	wait( 0.2 );
859 lars 223
	$lab_security3.walkto( "$lab_security3_nav1", "run" );
448 lars 224
	wait( 3 );
225
	$lab_exit1.movedown( 120 );
226
 
444 argyle 227
	$lab_security4.ai_on();
859 lars 228
	$lab_security3.ai_on();
429 argyle 229
}
230
 
600 TickNSwist 231
void secret_button()
232
{
601 lars 233
	$obj_button01.time (1);
234
	$obj_button01.movenorth (2);
858 Avenger 235
 
236
	$xmas_door.unlock();
237
	$xmas_trigger.nottriggerable();
601 lars 238
}
429 argyle 239
 
240
void koi_swim()
241
{
494 lars 242
	wait(1);
243
	$koi1.anim( "idle" );
244
	$koi1.followpath( $koi1_path , "loop" , "normalangles" );
429 argyle 245
 
494 lars 246
	$koi2.anim( "idle" );
247
	$koi2.followpath( $koi2_path , "loop" , "normalangles" );
429 argyle 248
}
249
 
248 argyle 250
void init()
251
{
678 argyle 252
	//--hide forcefield
494 lars 253
	$kraftfeld.hide();
254
	$kraftfeld2.hide();
255
	$kraftfeld3.hide();
846 lars 256
	$kraftfeld.notsolid();
257
	$kraftfeld2.notsolid();
258
	$kraftfeld3.notsolid();
494 lars 259
	$kraft_feld_poison.hide();
260
	$kraft_feld_poison.notsolid();
444 argyle 261
 
494 lars 262
	//--Showergirl SetUp
263
	$showergirl1.ai_off();
264
	$showergirl1.anim("conv-gesture1");
858 Avenger 265
	$shower_door_trigger.nottriggerable();
444 argyle 266
 
678 argyle 267
	//--Explosion trigger
494 lars 268
	$trigger1.nottriggerable();
444 argyle 269
 
678 argyle 270
	//--Door to bathroom
494 lars 271
	$shower_door_left.time( .1 );
272
	$shower_door_right.time( .1 );
273
	wait( .1 );
274
	$shower_door_left.moveWest( 40 );
275
	$shower_door_right.moveEast( 40 );
444 argyle 276
 
494 lars 277
	//--Gas im Korridor
278
	$gas.hide();
444 argyle 279
 
280
 
494 lars 281
	// Security Team
444 argyle 282
 
494 lars 283
	$lab_security1.setgroupid ( 666 );
284
	$lab_security2.setgroupid ( 666 );
444 argyle 285
 
494 lars 286
	$lab_security4.setgroupid ( 666 );
859 lars 287
	$lab_security3.setgroupid ( 666 );
444 argyle 288
 
289
 
681 argyle 290
	AIHideGroup    ( 666 );
444 argyle 291
 
494 lars 292
	// Beamout sequence
480 lars 293
	$illia_beamout.hide();
294
	$illia_beamout.notsolid();
295
	$illia_beamout.ai_off();
296
	$illia_beamout.pushable(0);
297
	spawn ( "Camera" , "targetname" , "cam1" );
496 lars 298
	//Take away weapons from illia!
299
	$illia_beamout.removeactorweapon ( "CompressionRifle" );
300
	$illia_beamout.removeactorweapon ( "AssaultRifle" );
301
	$illia_beamout.removeactorweapon ( "CompressionRifleEnhanced" );
480 lars 302
 
494 lars 303
	//Take away weapons from player!
304
	//Only tricorder remains in place!
305
	$player.take ( "models/weapons/worldmodel-compressionrifle.tik" );
306
	$player.take ( "models/weapons/worldmodel-fieldassaultrifle.tik" );
307
	$player.take ( "models/weapons/worldmodel-burstrifle.tik" );
308
	$player.take ( "models/weapons/worldmodel-attrex-rifle.tik" );
309
	$player.take ( "models/weapons/worldmodel-compressionrifle.tik" );
310
	$player.take ( "models/weapons/worldmodel-phaser-STX.tik" );
311
 
248 argyle 312
}
313
 
162 argyle 314
void trigger_shower_door()
315
{
494 lars 316
	$shower_door_left.time( .35 );
317
	$shower_door_right.time( .35 );
318
	wait( .1 );
319
	$shower_door_left.playsound( "sound/doors/forever_door1.wav" );
320
	$shower_door_left.moveEast( 40 );
321
	$shower_door_right.moveWest( 40 );
858 Avenger 322
	wait( 3 );
323
	$shower_door_trigger.triggerable();
162 argyle 324
}
248 argyle 325
 
326
///////////////////////////
327
//Wand fliegt in die Luft//
328
///////////////////////////
329
void wall_exp()
162 argyle 330
{
494 lars 331
	//$wall_puzzle.nottriggerable();
332
	triggerentity( $blabla_tut );
333
	triggerentity( $blabla_tut_overload );
334
	wait( 3.8 );
335
	$trigger1.triggerable();
336
	triggerentity( $trigger );
337
	$console.playsound( "sound/impact/explosion/expl_inside4.wav" );
338
	triggerentity( $console_exp );
339
	$player.earthquake( .75, 1.4 );
340
	$wall_hide.hide();
341
	wait( .2 );
342
	$console.playsound( "sound/impact/explosion/expl_inside3.wav" );
343
	triggerentity( $console_exp1 );
344
	$console.hide();
345
	$console.notsolid();
248 argyle 346
}
162 argyle 347
 
248 argyle 348
/////////////////////////////////////////////////////
349
/////////////////////Roter Alarm/////////////////////
350
//Wenn möglich nur target_speaker in den Korridoren//
351
/////////////////////////////////////////////////////
352
void redalert()
353
{
494 lars 354
	$world.light_fade( "redalert", .85, .4 );
355
	$player.playsound( "sound/redalert.mp3" );
356
	wait( .7 );
357
	$world.light_fade( "redalert", .2, .6 );
358
	wait( 1.8 );
359
	thread redalert();
248 argyle 360
}
162 argyle 361
 
248 argyle 362
////////////////////////////////////////
363
//Kraffelder + Sound schalten sich ein//
364
////////////////////////////////////////
365
void kraftfeld()
366
{
494 lars 367
	$gas.show();
368
	$kraftfeld.show();
846 lars 369
	$kraftfeld.solid();
494 lars 370
	triggerentity( $kraftfeld_sound );
681 argyle 371
	$kraftfeld.playsound( "sound/ships/borg/borg_forcefield_on.wav", 1, 1, 11111 );
372
	$kraftfeld.loopsound( "sound/ships/enterprise/ent_forcefield.wav", .7, 30 );
494 lars 373
	wait( 1 );
374
	$player.simpleplaydialog( "localization/sound/dialog/map04/computer/intruder.mp3", 1, 20000 ); //Lieutenant Munro, you have a visitor waiting for you in the main entrance.
375
	waitDialogLength( "localization/sound/dialog/map04/computer/intruder.mp3" );
376
	thread poison_gas();
377
	$player.simpleplaydialog( "localization/sound/dialog/map04/computer/gas.mp3", 1, 20000 ); //Lieutenant Munro, you have a visitor waiting for you in the main entrance.
378
	waitDialogLength( "localization/sound/dialog/map04/computer/gas.mp3" );
248 argyle 379
}
162 argyle 380
 
248 argyle 381
void poison_gas()
382
{
494 lars 383
	//////////////////////////////30 SEKUNDEN/////////////////////////////////////////
384
	/////////////////////////bis der Spieler stirbt///////////////////////////////////
385
	//Wenn er oder sie 100 Health hat.
386
	//"lebendesspielers", mir fiel nichts besseres ein!
387
	//Note:  Um den Timer zu verändern, kann man zwei Werte verändern.
388
	//		 Der erste Wert ist dazu da, um festzulegen, wie wiel Schaden
389
	//		 verursacht wird. Der zweite Wert ist dazu da, um festzulegen
390
	//		 wann der Spieler wieder verletzt wird.
391
	//HINWEIS: Wenn du nicht durch das Loch kommst, dann duck dich!
444 argyle 392
 
494 lars 393
	//First Get Initial Value of Chang's life
394
	float lebendesspielers;
395
	lebendesspielers = $player.gethealth();
444 argyle 396
 
494 lars 397
	//Now, continue looping until chang is dead.  If chang is saved
398
	//before he dies, then killthread MUST be called on this thread
399
	//to stop this counter
400
	while( lebendesspielers > 1.0 )
401
	{
402
		//Every iteration damage the player
403
		$player.hurt( 5 );
404
		lebendesspielers = $player.gethealth();
405
		//print ("end of cinematic thread life counter\n");
406
		//Check if chang is 'dead".  If he is, then fail the mission
407
		if ( lebendesspielers <= 1.0 )
408
		{
409
			wait( 1 );
410
			stuffcmd ( "kill\n" );
411
		}
412
		//Wait a specified interval before damaging again
413
		wait( 1.5 );
414
	}
248 argyle 415
}
162 argyle 416
 
248 argyle 417
void stop_poison_gas()
418
{
494 lars 419
	killthread( "poison_gas" );
420
	triggerentity( $kraft_feld_poison_sound );
421
	$kraft_feld_poison.show();
422
	$kraft_feld_poison.solid();
429 argyle 423
}
480 lars 424
 
425
void beamout_puzzle()
426
{
846 lars 427
	$player.simpleplaydialog("localization/sound/dialog/map04/Computer/energy.mp3",1,10000);
428
	waitdialoglength("localization/sound/dialog/map04/Computer/energy.mp3");
545 lars 429
	$end_trigger.triggerable();
480 lars 430
}
431
void beamout()
432
{
433
	freezeplayer();
617 lars 434
	cinematic();
678 argyle 435
        fakeplayer();
436
        $fakeplayer.warpto( "$beamout_nav" );
480 lars 437
	letterbox(.1);
438
	cam_fadeout( 2, 0, 0, 0, 1, 0 );
618 lars 439
	$cam1.follow($beamout_cam);
440
	cuecamera($cam1);
480 lars 441
	wait(.5);
617 lars 442
	cam_fadein( 0.5, 0, 0, 0, 1, 0 );
545 lars 443
        //Bring up a fake player model
444
        //Make the fakeplayer use the same weapon as you
445
        globalCommon_AiActorUseWeapon( $fakeplayer, "current" );
446
	$fakeplayer.displayEffect( "TransportOut", "Federation" );
480 lars 447
	wait(3);
617 lars 448
	cam_fadeout( 2, 0, 0, 0, 1, 0 );
480 lars 449
	clearletterbox(.1);
617 lars 450
	noncinematic();
545 lars 451
        removefakeplayer();
480 lars 452
	releaseplayer();
453
	cueplayer();
545 lars 454
	stuffcmd("map map5");
617 lars 455
	cam_fadein( 0.5, 0, 0, 0, 1, 0 );
456
}
644 lars 457
 
458
void initArchetypes()
459
{
460
 
461
      thread globalArchetype_Setup( $exp_console, "exp");
462
      thread globalArchetype_Setup( $beam_console, "beama");
463
 
464
      $bails.archetype ( "bails" );
465
      $jones.archetype ( "jones" );
466
      $shaun.archetype ( "shaun" );
467
      $jenks.archetype ( "jenks" );
468
      $eddie.archetype ( "eddie" );
469
      $catrin.archetype ( "catrin" );
470
}
681 argyle 471
 
472
 
473
void lock_lab_entry()
474
{
475
   AIShowGroup    ( 666, "Federation" );
476
   $lab_entry.lock();
477
}
858 Avenger 478
 
479
void closed_door_sound()
480
{
481
	$player.playsound( "sound/doors/door_locked.wav");
482
}
483
 
484
void closed_door_sound_2()
485
{
486
	$player.playsound( "sound/environment/computer/lcars_no.wav");
487
}
488
 
489
//Secret Room Puzzle
490
 
491
void puzzleUsed()
492
{
493
	globalTricorderKeypad_SetType( "Starfleet" );
494
	globalTricorderKeypad_SetScannedCodeFlag( 0 );
495
	globalTricorderKeypad_SetSecretCode( 7, 9, 7, 9, 0, 0, 0, 0, 0 ); //4 digit code
496
	globalTricorderKeypad_Run( $secretRoomPuzzle, 100, 3);
497
}
498
 
499
void puzzleReset()
500
{
501
	$secretRoomPuzzle.puzzleobject_reset();
502
}
503
 
504
void puzzleSolved()
505
{
506
	$secretRoomPuzzle.playsound( "sound/ships/romulan/rom_beep_yes.wav", 0, 1 );
507
	$7_door.unlock();
508
	$7_trigger.nottriggerable();
509
	trigger( "$7_door" );
510
	$secretRoomPuzzle.remove(); //so that player doesn't have to keep re-entering the puzzle code
511
}