Subversion-Projekte sthq.gbs

Revision

Revision 697 | Revision 877 | 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
604 lars 7
//  Last Edited on: 	03/11/04
8
//  Last Edited By: 	7o'nine
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
 
695 argyle 168
	soundtrack( "music/m7l1-attrexian_colony.mus");
169
 
279 drbob 170
	setupWorld();
171
 
695 argyle 172
	thread intro_cin();
279 drbob 173
 
174
}
175
 
176
void setupWorld()
177
{
590 lars 178
	//$illia.remove();
179
	//fakeplayer();
279 drbob 180
 
591 TickNSwist 181
	////DOOR SETUP////
586 TickNSwist 182
	$b03_door_01.lock();
183
	$b03_door_02.lock();
184
	$b02_door_02.unlock();
587 TickNSwist 185
	$b02_door_01.unlock();
186
	$b01_door_02.unlock();
591 TickNSwist 187
 
697 argyle 188
 
189
	//initialize hintes
190
        initArchetypes();
191
 
279 drbob 192
	//Setup onUse threads...
193
 
194
 
195
	//Load the mission objectives
604 lars 196
	$player.LoadObjectives( "GBS8" );
279 drbob 197
 
198
	//Give the player her weapons, and remove the prisoner's
199
	globalLoadout_GiveWeapon( WEAPON_TRICORDER_STX );
200
	globalLoadout_GiveWeapon( WEAPON_ROMULAN_DISRUPTOR );
201
	globalLoadout_GiveWeapon( WEAPON_PHASER_STX );
202
	globalLoadout_GiveWeapon( WEAPON_ASSAULT_SHOTGUN );
203
	globalLoadout_GiveWeapon( WEAPON_GRENADE_LAUNCHER );
204
	$player.give( "models/weapons/worldmodel-rom-disruptor-rifle.tik" );
205
	$illia_prisoner.removeactorweapon ( "CompressionRifle" );
206
	$illia_prisoner.removeactorweapon ( "AssaultRifle" );
207
	$illia_prisoner.removeactorweapon ( "CompressionRifleEnhanced" );
208
 
209
	//Spawn cameras
210
	spawn( "Camera", "targetname", "cam1" );
211
	spawn( "Camera", "targetname", "cam2" );
212
	spawn( "Camera", "targetname", "cam3" );
213
 
214
	//Remove NPCs AI
604 lars 215
	$illia.ai_off();
279 drbob 216
	$illia_prisoner.ai_off();
217
	$tebok.ai_off();
218
 
219
	//Set NPCs sides
220
 
221
	//Setup NPC animations
222
 
223
	//Setup NPC facial animation
224
	$stammheim.morph( "exp_eyes_heavy" );
225
	$stammheim.morph( "exp_Nervous" );
226
	$stammheim.morph( "exp_Fear" );
227
	$stammheim.morph( "exp_Sad" );
228
 
229
	//Make NPCs non-pushable
230
	$illia_prisoner.pushable( 0 );
231
	$tebok.pushable( 0 );
590 lars 232
	$illia.pushable( 0 );
233
//	$fakeplayer.pushable( 0 );
279 drbob 234
 
235
	//Hide and notsolid certain things...
236
	$illia_prisoner.hide();
237
	$tebok.hide();
590 lars 238
	$illia.pushable( 0 );
239
//	$fakeplayer.hide();
279 drbob 240
 
241
	$illia_prisoner.notsolid();
242
	$tebok.notsolid();
590 lars 243
	$illia.pushable( 0 );
244
//	$fakeplayer.notsolid();
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" );
260
	globalCommon_AiActorUseWeapon( $illia, "current" );
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 );
269
 
590 lars 270
	$illia.DisplayEffect( "TransportIn", "Romulan" );
271
//	$fakeplayer.DisplayEffect( "TransportIn", "Romulan" );
279 drbob 272
	wait( 2.7 );
217 lars 273
 
590 lars 274
	$illia.show();
275
	$illia.solid();
276
/*	$fakeplayer.show();
277
	$fakeplayer.solid();*/
279 drbob 278
	$cam1.follow( $map8_intro1 );
217 lars 279
	$cam1.cut();
279 drbob 280
	wait( 1 );
217 lars 281
 
279 drbob 282
	cuecamera( $cam1 );
283
	wait( 5 );
217 lars 284
 
279 drbob 285
	cuecamera( $cam3 );
217 lars 286
 
590 lars 287
/*	$fakeplayer.playdialog( "localization/sound/dialog/map08/illia/inshorttime.mp3", 1, 10000, 0 );
288
	waitfordialog( $fakeplayer );*/
289
	$illia.playdialog( "localization/sound/dialog/map08/illia/inshorttime.mp3", 1, 10000, 0 );
290
	waitfordialog( $illia );
217 lars 291
 
279 drbob 292
	wait( 0.05 );
217 lars 293
 
279 drbob 294
	$cam2.follow( $cell_cam );
217 lars 295
	$cam2.cut();
279 drbob 296
	wait( 0.5 );
217 lars 297
 
279 drbob 298
	cuecamera( $cam2 );
299
 
217 lars 300
	$illia_prisoner.show();
301
	$illia_prisoner.solid();
279 drbob 302
	$illia_prisoner.anim( "cin-m8_situp" );
217 lars 303
 
304
	cam_fadein( 3, 0, 0, 0, 1, 0 );
305
 
279 drbob 306
	$illia_prisoner.playdialog( "localization/sound/dialog/map08/Illia/iwasaware.mp3", 1, 10000, 0 );
217 lars 307
	waitfordialog( $illia_prisoner );
279 drbob 308
 
309
	$illia_prisoner.playdialog( "localization/sound/dialog/map08/Illia/stillalive.mp3", 1, 10000, 0 );
217 lars 310
	waitfordialog( $illia_prisoner );
311
 
279 drbob 312
	wait( 2 );
217 lars 313
 
279 drbob 314
	cuecamera( $cam3 );
217 lars 315
 
590 lars 316
/*	$fakeplayer.playdialog( "localization/sound/dialog/map08/illia/nochoice.mp3", 1, 10000, 0 );
317
	waitfordialog( $fakeplayer );*/
318
	$illia.playdialog( "localization/sound/dialog/map08/illia/nochoice.mp3", 1, 10000, 0 );
319
	waitfordialog( $illia );
217 lars 320
 
279 drbob 321
	wait( 0.2 );
217 lars 322
 
695 argyle 323
	thread finish_intro_cin();
324
}
325
 
326
void finish_intro_cin()
327
{
328
   	killthread("intro_cin");
329
	cam_fadein( 3, 0, 0, 0, 1, 0 );
279 drbob 330
	$illia_prisoner.remove();
590 lars 331
	$illia.hide();
332
	$illia.notsolid();
333
 
279 drbob 334
	clearletterbox( 0.1 );
217 lars 335
	releaseplayer();
336
	noncinematic();
337
	cueplayer();
279 drbob 338
 
339
	//Make a new objective appear: find the entrance to the caves
217 lars 340
	//Make the blip appear on your radar
341
	$player.missionobjective( 1 );
342
	//Make the mission objective appear
343
	$player.setobjectiveshow( "findentrance", 1 );
695 argyle 344
	$player.setobjectiveshow( "findstammheim", 1 );
345
 
346
 
217 lars 347
}
348
 
279 drbob 349
//PUZZLE FUNCTIONS
350
void Puzzle_Used()
217 lars 351
{
279 drbob 352
	globalTricorderKeypad_SetType( "Starfleet" );
353
	globalTricorderKeypad_SetScannedCodeFlag( 0 );
697 argyle 354
	globalTricorderKeypad_SetSecretCode( 3, 1, 4, 1, 5, 0, 0, 0, 0 );
456 TickNSwist 355
		//Edited by TICKNSWISTED:changed SecretCode to Pi for ingame clue.
697 argyle 356
		//Edited By Argyle: Sorry, the code was too long, good idea about Pi though.
279 drbob 357
	globalTricorderKeypad_Run( $cave_forcefield_puzzle, 100, 3);
358
}
359
 
360
void Puzzle_Reset()
361
{
362
	$cave_forcefield_puzzle.puzzleobject_reset();
363
}
364
 
365
void Puzzle_Solved()
366
{
367
	$cave_forcefield_puzzle.playsound( "sound/ships/romulan/rom_beep_yes.wav", 0, 1 );
697 argyle 368
	cam_fadeout( 1, 0, 0, 0, 1, 0 );
369
 
370
	freezeplayer();
371
	cinematic();
372
	letterbox ( 0.1 );
373
 
374
 
375
	$cam3.follow( $map8_ff0 );
376
	$cam3.cut();
377
	wait( 0.5 );
378
 
379
	cuecamera( $cam3 );
380
 
381
	cam_fadein( 1, 0, 0, 0, 1, 0 );
382
 
383
	wait(1.5);
384
 
279 drbob 385
	remove_cave_forcefield();
697 argyle 386
 
387
 
388
	wait(4);
389
 
390
	clearletterbox( 0.1 );
391
	releaseplayer();
392
	noncinematic();
393
	cueplayer();
695 argyle 394
}