Subversion-Projekte sthq.gbs

Revision

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