Subversion-Projekte sthq.gbs

Revision

Revision 888 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
279 drbob 1
//  EF2 Level Script File
2
//
695 argyle 3
//  Level:		map8.bsp
880 lars 4
//  Script By:	DrBob, ltiefland, TickNSwisted
279 drbob 5
//  Geometry By:	TickNSwisted
880 lars 6
//  Created on:	17/04/04
7
// Last Edited on:  $Date: 2007-06-20 22:47:49 +0200 (Mi, 20 Jun 2007) $
8
// Last Edited by:	$Author: avenger $
279 drbob 9
 
10
//INCLUDES
11
	#include "maps/global_scripts/global_common.scr"
12
	#include "maps/global_scripts/global_playerLoadout.scr"
13
	#include "maps/global_scripts/global_debugUtils.scr"
14
	#include "maps/global_scripts/global_tricorderBase.scr"
15
	#include "maps/global_scripts/global_tricorderKeypad.scr"
880 lars 16
    #include "maps/global_scripts/global_archetype.scr"
591 TickNSwist 17
 
18
//FUNCTIONS
604 lars 19
	void openFirstDoor();
20
	void closeFirstDoor();
591 TickNSwist 21
	void remove_forcefield();
22
	void remove_cave_forcefield();
23
	void b03_door_01_unlock();
24
	void b03_door_01_relock();
25
	void b02_door_01_relock();
26
 
695 argyle 27
        void finish_intro_cin();
28
	void initArchetypes();
29
 
591 TickNSwist 30
	void main();
31
	void setupWorld();
32
	void intro_cin();
33
 
34
	void Puzzle_Used();
35
	void Puzzle_Reset();
36
	void Puzzle_Solved();
37
 
279 drbob 38
//VARIABLE DECLARATIONS
591 TickNSwist 39
	float func_rem_ff_used = 0;
279 drbob 40
 
591 TickNSwist 41
 
42
////////////////////////
43
/////////SCRIPT/////////
44
////////////////////////
45
 
604 lars 46
void openFirstDoor ()
47
{
48
	$openDoorTrigger.playsound ( "sound/environment/switches/switch_01.wav" , 3, .3, 10000 );
49
	$openDoorTrigger.playsound ( "sound/ships/romulan/rom_beep_yes.wav" , 7, .3, 10000 );
50
	wait( .1 );
51
 
52
	$openDoorTrigger.nottriggerable ();
888 lars 53
 
54
	$reinhard.setTargetType(1);//Chrisstrahl 2007.05.07
55
	$reinhard.sethatemodifier( 1 );//Chrisstrahl 2007.05.07
56
	$reinhard0.kill();//Chrisstrahl 2007.05.07
57
	wait(.1);
58
	$reinhard0.remove();//Chrisstrahl 2007.05.07
59
    $OuterDoorPart1.playsound ( "sound/doors/drull_bigdoor_01.wav", 5, 1, 300);
604 lars 60
	$OuterDoorPart1.time( 5 );
61
	$OuterDoorPart1.moveUp( 6 );
62
	$OuterDoorPart2.time( 5 );
63
	$OuterDoorPart2.moveUp( 36 );
64
	$OuterDoorPart3.time( 5 );
65
	$OuterDoorPart3.moveUp( 66 );
888 lars 66
 
604 lars 67
	$OuterDoorPart4.time( 5 );
68
	$OuterDoorPart4.moveUp( 96 );
69
	$OuterDoorPart5.time( 5 );
70
	$OuterDoorPart5.moveUp( 126 );
890 avenger 71
	$OuterDoorPart5.playsound ( "sound/doors/drull_bigdoor_stop_01.wav", 5, 1, 300);
72
 
888 lars 73
    waitfor ( $OuterDoorPart5 );
604 lars 74
 
75
	wait ( 5 );
76
    	closeFirstDoor();
888 lars 77
	//Romulan soliders, get em to wake up
78
	$frida.hurt(1);//Chrisstrahl 2007.05.07
79
	$berta.hurt(1);//Chrisstrahl 2007.05.07
80
 
604 lars 81
}
82
 
695 argyle 83
 
84
void initArchetypes()
85
{
86
      thread globalArchetype_Setup( $hint_riddle, "number");
697 argyle 87
      thread globalArchetype_Setup( $hint2, "hint2");
88
      thread globalArchetype_Setup( $hint3, "hint3");
89
      thread globalArchetype_Setup( $hint4, "hint4");
90
      thread globalArchetype_Setup( $hint5, "hint5");
695 argyle 91
 
92
}
93
 
604 lars 94
void closeFirstDoor()
95
{
96
	$openDoorTrigger.playsound ( "sound/environment/switches/switch_01.wav" , 3, .3, 10000 );
97
	$openDoorTrigger.playsound ( "sound/ships/romulan/rom_beep_yes.wav" , 7, .3, 10000 );
98
 
99
    	$OuterDoorPart1.playsound ( "sound/doors/drull_bigdoor_01.wav", 5, 1, 300);
100
	$OuterDoorPart1.time( 3 );
101
	$OuterDoorPart1.moveDown( 6 );
102
	$OuterDoorPart2.time( 3 );
103
	$OuterDoorPart2.moveDown( 36 );
104
	$OuterDoorPart3.time( 3 );
105
	$OuterDoorPart3.moveDown( 66 );
106
	$OuterDoorPart4.time( 3 );
107
	$OuterDoorPart4.moveDown( 96 );
108
	$OuterDoorPart5.time( 3 );
109
	$OuterDoorPart5.moveDown( 126 );
110
	waitfor( $OuterDoorPart1 );
111
 
112
    	$OuterDoorPart1.playsound ( "sound/doors/drull_bigdoor_stop_01.wav", 5, 1, 300);
113
 
114
	$openDoorTrigger.triggerable ();
115
}
116
 
117
 
279 drbob 118
void remove_forcefield()
119
{
591 TickNSwist 120
 if (func_rem_ff_used == 0)	//see if this thread was used previous
121
  {
122
   $b03_door_02.unlock();	//unlock second door of third building
890 avenger 123
	if(doesEntityExist($forcefield)){
124
		$forcefield.remove();	//remove force field in third building
125
	}
126
	if(doesEntityExist($forcefield_speaker)){
127
		$forcefield_speaker.stoploopsound();
128
		$forcefield_speaker.playsound("sound/ships/enterprise/ent_forcefield_down.wav",0,1);
129
		$forcefield_speaker.remove();//delete the forcefield from the world
130
	}
131
 
591 TickNSwist 132
   func_rem_ff_used = 1;
133
  }
134
 else
135
  {
136
   if (func_rem_ff_used == 1)	//if used prior, just play this sound
137
    {
138
     $forcefield_speaker.playsound( "sound/ships/romulan/rom_beep3.wav", 0, 1 );
139
    }
140
  }
279 drbob 141
}
142
 
591 TickNSwist 143
 
586 TickNSwist 144
void b03_door_01_unlock()
145
{
146
 $b03_door_01.unlock();
604 lars 147
 // unlock bunker 3's door_01.
586 TickNSwist 148
 $b02_door_01.lock();
149
}
150
 
151
void b03_door_01_relock()
152
{
153
 $b03_door_01.lock();
604 lars 154
 // relock bunker 3's door_01.
586 TickNSwist 155
}
156
 
587 TickNSwist 157
void b02_door_01_relock()
586 TickNSwist 158
{
587 TickNSwist 159
 $b02_door_01.lock();
890 avenger 160
	if(doesEntityExist($b01_door_02)){
161
 
162
	}
586 TickNSwist 163
}
164
 
591 TickNSwist 165
 
279 drbob 166
void remove_cave_forcefield()
890 avenger 167
{//remove cave forcefield and speaker
168
 
169
	if(doesEntityExist($cave_forcefield)){
170
		$cave_forcefield.playsound( "sound/ships/borg/borg_forcefield1_down.wav");
171
	}
172
	if(doesEntityExist($cave_forcefield)){
173
		$cave_forcefield.remove();	 	//remove cave forcefield and speaker
174
		$cave_forcefield_speaker.remove();	//remove cave forcefield and speaker
175
	}
279 drbob 176
}
177
 
591 TickNSwist 178
 
279 drbob 179
void main()
180
{
573 TickNSwist 181
	$world.weather( "snow", 200 );
586 TickNSwist 182
	$world.entity_fade_dist( 3000 );
604 lars 183
 
184
	$world.farplane( 2500 );
185
	$world.farplane_color ( '0.0875 0.1 0.145' ); //match skybox fog colour
186
	$world.farplane_cull( 1 );
187
	$world.farplane_fog( 1 );
591 TickNSwist 188
 
877 lars 189
	$world.soundtrack( "music/m7l1-attrexian_colony.mus");
279 drbob 190
	setupWorld();
191
 
695 argyle 192
	thread intro_cin();
279 drbob 193
 
194
}
195
 
196
void setupWorld()
197
{
590 lars 198
	//$illia.remove();
199
	//fakeplayer();
279 drbob 200
 
591 TickNSwist 201
	////DOOR SETUP////
586 TickNSwist 202
	$b03_door_01.lock();
203
	$b03_door_02.lock();
890 avenger 204
	//$b02_door_02.unlock();
587 TickNSwist 205
	$b02_door_01.unlock();
890 avenger 206
	if(doesEntityExist($b01_door_02)){
207
		$b01_door_02.unlock();
208
	}
591 TickNSwist 209
 
697 argyle 210
	//initialize hintes
211
        initArchetypes();
212
 
279 drbob 213
	//Setup onUse threads...
214
 
215
 
216
	//Load the mission objectives
604 lars 217
	$player.LoadObjectives( "GBS8" );
279 drbob 218
 
219
	//Give the player her weapons, and remove the prisoner's
220
	globalLoadout_GiveWeapon( WEAPON_TRICORDER_STX );
888 lars 221
	globalLoadout_GiveWeapon( WEAPON_PHASER_STX );
279 drbob 222
	globalLoadout_GiveWeapon( WEAPON_ROMULAN_DISRUPTOR );
888 lars 223
	globalLoadout_GiveWeapon( WEAPON_COMPRESSION_RIFLE );
224
	globalLoadout_GiveWeapon( WEAPON_BURST_RIFLE );
279 drbob 225
	globalLoadout_GiveWeapon( WEAPON_ASSAULT_SHOTGUN );
888 lars 226
	//globalLoadout_GiveWeapon( WEAPON_GRENADE_LAUNCHER );
279 drbob 227
	$illia_prisoner.removeactorweapon ( "CompressionRifle" );
228
	$illia_prisoner.removeactorweapon ( "AssaultRifle" );
229
	$illia_prisoner.removeactorweapon ( "CompressionRifleEnhanced" );
230
 
231
	//Spawn cameras
232
	spawn( "Camera", "targetname", "cam1" );
233
	spawn( "Camera", "targetname", "cam2" );
234
	spawn( "Camera", "targetname", "cam3" );
235
 
236
	//Remove NPCs AI
604 lars 237
	$illia.ai_off();
279 drbob 238
	$illia_prisoner.ai_off();
239
	$tebok.ai_off();
240
 
241
	//Set NPCs sides
242
 
243
	//Setup NPC animations
244
 
245
	//Setup NPC facial animation
890 avenger 246
	if(doesEntityExist($stammheim)){
247
		$stammheim.morph( "exp_eyes_heavy" );
248
		$stammheim.morph( "exp_Nervous" );
249
		$stammheim.morph( "exp_Fear" );
250
		$stammheim.morph( "exp_Sad" );
251
	}
279 drbob 252
 
253
	//Make NPCs non-pushable
254
	$illia_prisoner.pushable( 0 );
255
	$tebok.pushable( 0 );
590 lars 256
	$illia.pushable( 0 );
257
//	$fakeplayer.pushable( 0 );
279 drbob 258
 
259
	//Hide and notsolid certain things...
260
	$illia_prisoner.hide();
261
	$tebok.hide();
590 lars 262
	$illia.pushable( 0 );
263
//	$fakeplayer.hide();
279 drbob 264
 
265
	$illia_prisoner.notsolid();
266
	$tebok.notsolid();
590 lars 267
	$illia.pushable( 0 );
268
//	$fakeplayer.notsolid();
877 lars 269
	$player.use("fieldassaultrifle");
279 drbob 270
}
271
 
272
//CINEMATIC FUNCTIONS
217 lars 273
void intro_cin()
274
{
695 argyle 275
	skipthread ( "finish_intro_cin" );
276
 
279 drbob 277
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
278
 
217 lars 279
	freezeplayer();
280
	cinematic();
279 drbob 281
	letterbox ( 0.1 );
217 lars 282
 
279 drbob 283
	//Make the fakeplayer use the same weapon as you
590 lars 284
//	globalCommon_AiActorUseWeapon( $fakeplayer, "current" );
877 lars 285
	globalCommon_AiActorUseWeapon( $illia, "fieldassaultrifle" );
217 lars 286
 
279 drbob 287
	$cam3.follow( $map8_intro2 );
288
	$cam3.cut();
289
	wait( 0.5 );
217 lars 290
 
279 drbob 291
	cuecamera( $cam3 );
292
 
217 lars 293
	cam_fadein( 1, 0, 0, 0, 1, 0 );
590 lars 294
	$illia.DisplayEffect( "TransportIn", "Romulan" );
295
//	$fakeplayer.DisplayEffect( "TransportIn", "Romulan" );
279 drbob 296
	wait( 2.7 );
217 lars 297
 
590 lars 298
	$illia.show();
299
	$illia.solid();
300
/*	$fakeplayer.show();
301
	$fakeplayer.solid();*/
279 drbob 302
	$cam1.follow( $map8_intro1 );
217 lars 303
	$cam1.cut();
279 drbob 304
	wait( 1 );
217 lars 305
 
279 drbob 306
	cuecamera( $cam1 );
307
	wait( 5 );
217 lars 308
 
279 drbob 309
	cuecamera( $cam3 );
217 lars 310
 
590 lars 311
/*	$fakeplayer.playdialog( "localization/sound/dialog/map08/illia/inshorttime.mp3", 1, 10000, 0 );
312
	waitfordialog( $fakeplayer );*/
313
	$illia.playdialog( "localization/sound/dialog/map08/illia/inshorttime.mp3", 1, 10000, 0 );
314
	waitfordialog( $illia );
217 lars 315
 
279 drbob 316
	wait( 0.05 );
217 lars 317
 
279 drbob 318
	$cam2.follow( $cell_cam );
217 lars 319
	$cam2.cut();
279 drbob 320
	wait( 0.5 );
217 lars 321
 
279 drbob 322
	cuecamera( $cam2 );
323
 
217 lars 324
	$illia_prisoner.show();
325
	$illia_prisoner.solid();
279 drbob 326
	$illia_prisoner.anim( "cin-m8_situp" );
217 lars 327
 
328
	cam_fadein( 3, 0, 0, 0, 1, 0 );
329
 
279 drbob 330
	$illia_prisoner.playdialog( "localization/sound/dialog/map08/Illia/iwasaware.mp3", 1, 10000, 0 );
217 lars 331
	waitfordialog( $illia_prisoner );
279 drbob 332
 
333
	$illia_prisoner.playdialog( "localization/sound/dialog/map08/Illia/stillalive.mp3", 1, 10000, 0 );
217 lars 334
	waitfordialog( $illia_prisoner );
335
 
279 drbob 336
	wait( 2 );
217 lars 337
 
279 drbob 338
	cuecamera( $cam3 );
217 lars 339
 
590 lars 340
/*	$fakeplayer.playdialog( "localization/sound/dialog/map08/illia/nochoice.mp3", 1, 10000, 0 );
341
	waitfordialog( $fakeplayer );*/
342
	$illia.playdialog( "localization/sound/dialog/map08/illia/nochoice.mp3", 1, 10000, 0 );
343
	waitfordialog( $illia );
217 lars 344
 
279 drbob 345
	wait( 0.2 );
217 lars 346
 
695 argyle 347
	thread finish_intro_cin();
348
}
349
 
350
void finish_intro_cin()
351
{
352
   	killthread("intro_cin");
353
	cam_fadein( 3, 0, 0, 0, 1, 0 );
279 drbob 354
	$illia_prisoner.remove();
590 lars 355
	$illia.hide();
356
	$illia.notsolid();
357
 
888 lars 358
	$player.origin('192.00 -1.00 -20.00');//Chrisstrahl 2007.05.07, warped player to illia cin possition back to avoid char stuck
279 drbob 359
	clearletterbox( 0.1 );
217 lars 360
	releaseplayer();
361
	noncinematic();
362
	cueplayer();
279 drbob 363
 
364
	//Make a new objective appear: find the entrance to the caves
217 lars 365
	//Make the blip appear on your radar
366
	$player.missionobjective( 1 );
367
	//Make the mission objective appear
368
	$player.setobjectiveshow( "findentrance", 1 );
695 argyle 369
	$player.setobjectiveshow( "findstammheim", 1 );
370
 
371
 
217 lars 372
}
373
 
279 drbob 374
//PUZZLE FUNCTIONS
375
void Puzzle_Used()
217 lars 376
{
888 lars 377
	//globalTricorderKeypad_SetType( "Starfleet" );
378
	globalTricorderKeypad_SetType( "romulan" );
279 drbob 379
	globalTricorderKeypad_SetScannedCodeFlag( 0 );
697 argyle 380
	globalTricorderKeypad_SetSecretCode( 3, 1, 4, 1, 5, 0, 0, 0, 0 );
456 TickNSwist 381
		//Edited by TICKNSWISTED:changed SecretCode to Pi for ingame clue.
697 argyle 382
		//Edited By Argyle: Sorry, the code was too long, good idea about Pi though.
279 drbob 383
	globalTricorderKeypad_Run( $cave_forcefield_puzzle, 100, 3);
384
}
385
 
386
void Puzzle_Reset()
387
{
388
	$cave_forcefield_puzzle.puzzleobject_reset();
389
}
390
 
391
void Puzzle_Solved()
392
{
393
	$cave_forcefield_puzzle.playsound( "sound/ships/romulan/rom_beep_yes.wav", 0, 1 );
697 argyle 394
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
395
 
396
	freezeplayer();
397
	cinematic();
398
	letterbox ( 0.1 );
399
 
400
 
401
	$cam3.follow( $map8_ff0 );
402
	$cam3.cut();
403
	wait( 0.5 );
404
 
405
	cuecamera( $cam3 );
406
 
407
	cam_fadein( 1, 0, 0, 0, 1, 0 );
408
 
409
	wait(1.5);
410
 
279 drbob 411
	remove_cave_forcefield();
697 argyle 412
 
413
 
414
	wait(4);
415
 
416
	clearletterbox( 0.1 );
417
	releaseplayer();
418
	noncinematic();
419
	cueplayer();
695 argyle 420
}