Subversion-Projekte sthq.gbs

Revision

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