Subversion-Projekte sthq.gbs

Revision

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