Subversion-Projekte sthq.gbs

Revision

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

Revision Autor Zeilennr. Zeile
640 argyle 1
//--------------------------------------------------------------------------------------
2
//
3
//  A Gate Two Birds And The Beautiful Sky Level Script File
4
//
5
//  Level:		map1
6
//  Script By:		Argyle
7
//  Geometry By:	Flix
8
//  Created on:		???
880 lars 9
//  Last Edited on:    $Date: 2007-05-09 21:55:47 +0200 (Mi, 09 Mai 2007) $
10
//  Last Edited by:     $Author: lars $
640 argyle 11
//
12
//-------------------------------------------------------------------------------------
154 argyle 13
 
663 lars 14
#include "maps/global_scripts/global_common.scr"
15
#include "maps/global_scripts/global_debugUtils.scr"
16
#include "maps/global_scripts/global_math.scr"
17
#include "maps/global_scripts/global_archetype.scr"
18
#include "maps/m11/m11l1a_dialog.scr"
19
#include "maps/m11/m11_groupSpawn.scr"
20
#include "maps/global_scripts/global_playerLoadout.scr"
21
#include "maps/m11/m11_beamInAmmo.scr"
22
#include "maps/global_scripts/global_tricorderbase.scr"
23
#include "maps/global_scripts/global_tricordermod.scr"
24
 
215 argyle 25
void main();
26
void spawn_disrupter_klingon( entity entity_to_spawn);
27
void spawn_melee_klingon( entity entity_to_spawn);
28
void inc_death_toll();
29
void change_map();
30
void finish_holocin();
31
void start_holocin();
32
void finish_introcin();
33
void start_introcin();
34
void show_camera(entity camera_to_use, entity camera_path, float duration_to_wait);
35
void switch_off_ai();
36
 
176 argyle 37
float killed_klingons = 0;
38
 
172 argyle 39
void switch_off_ai()
169 argyle 40
{
191 argyle 41
 
42
   $illia_prisoner.ai_off();
43
 
44
   $illia_prisoner.removeactorweapon ( "CompressionRifle" );
45
   $illia_prisoner.anim("cin-m8_situp");
169 argyle 46
   $illia.ai_off();
172 argyle 47
   $illia2.ai_off();
176 argyle 48
   $moya.ai_off();
177 argyle 49
   $moya.nodamage ();
50
   $moya.notsolid ();
176 argyle 51
   $moya2.ai_off();
172 argyle 52
   $death_klingon.ai_off();
169 argyle 53
   $klingon1.ai_off();
54
   $klingon3.ai_off();
55
   $klingon4.ai_off();
56
   $klingon5.ai_off();
57
   $klingon6.ai_off();
176 argyle 58
 
59
   $klingon1.killthread("inc_death_toll");
60
   $klingon3.killthread("inc_death_toll");
61
   $klingon4.killthread("inc_death_toll");
62
   $klingon5.killthread("inc_death_toll");
63
   $klingon6.killthread("inc_death_toll");
169 argyle 64
}
65
 
151 argyle 66
void show_camera(entity camera_to_use, entity camera_path, float duration_to_wait)
67
{
68
   camera_to_use.follow( camera_path );
69
   cuecamera( camera_to_use );
70
   wait(.2);
71
   cam_fadein( 1, 0, 0, 0, 1, 0 );
72
   wait(duration_to_wait);
73
   cam_fadeout( 1, 0, 0, 0, 1, 0 );
74
   wait(1);
75
 
76
}
166 argyle 77
 
78
 
79
void start_introcin()
151 argyle 80
{
169 argyle 81
   cinematic();
82
   letterbox(.1);
151 argyle 83
   cam_fadeout( .1, 0, 0, 0, 1, 0 );
84
 
85
   spawn ( "Camera" , "targetname" , "cam1" );
86
   spawn ( "Camera" , "targetname" , "cam2" );
87
   spawn ( "Camera" , "targetname" , "cam3" );
88
   spawn ( "Camera" , "targetname" , "cam4" );
89
   spawn ( "Camera" , "targetname" , "cam5" );
169 argyle 90
   spawn ( "Camera" , "targetname" , "cam6" );
191 argyle 91
   spawn ( "Camera" , "targetname" , "cam7" );
151 argyle 92
 
93
   wait ( .05 );
354 lars 94
   /*cam.load("holo2_gate_cam");
151 argyle 95
   cam.load("holo2_illia_cam");
169 argyle 96
   cam.load("holo2_illia_cam2");
151 argyle 97
   cam.load("holo2_klingon_cam");
98
   cam.load("holo2_illia_close_cam");
354 lars 99
   cam.load("holo2_klingon_close_cam");*/
151 argyle 100
 
101
   wait ( .5);
215 argyle 102
   skipthread ( "finish_introcin" );
103
   freezeplayer();
151 argyle 104
 
172 argyle 105
   switch_off_ai();
151 argyle 106
 
169 argyle 107
 
191 argyle 108
   wait(2);
151 argyle 109
 
191 argyle 110
 
111
   $cam7.follow($cell_cam);
112
   cuecamera($cam7);
113
 
114
   wait(0.5);
115
 
116
   cam_fadein( 3, 0, 0, 0, 1, 0 );
117
   wait(3);
215 argyle 118
   $illia_prisoner.headwatch( $illia_look_here);
119
   wait(1.5);
120
   //$illia_prisoner.resethead();
121
 
191 argyle 122
   $illia_prisoner.playdialog("localization/sound/dialog/map01/Illia/everythingbegan.mp3", 1, 10000, 0);
123
   waitfordialog( $illia_prisoner );
379 nemo22 124
   wait( 1 );
219 lars 125
   $illia_prisoner.playdialog("localization/sound/dialog/map01/Illia/itwasabout.mp3", 1, 10000, 0);
126
   waitfordialog( $illia_prisoner );
191 argyle 127
   cam_fadeout( 3, 0, 0, 0, 1, 0 );
128
 
129
   wait(4);
130
 
131
 
132
 
155 argyle 133
   //   stuffcmd("showmenu we_proudly_present\n");
151 argyle 134
 
155 argyle 135
   // wait(2);
136
 
137
   //  stuffcmd ( "popmenu 0\n" );
138
   // wait(3);
151 argyle 139
   stuffcmd("showmenu gbs\n");
140
   wait(4);
141
   stuffcmd ( "popmenu 0\n" );
142
 
155 argyle 143
 
144
 
145
 
151 argyle 146
   show_camera($cam1, $holo2_gate_cam, 3);
147
   wait(.5);
191 argyle 148
   $world.light_lightstyle( "lightning", "azaz", 1 );
149
   $player.playsound( "sound/environment/nature/thunder2.wav", 0, 1.5, 10000 );
177 argyle 150
   show_camera($cam2, $holo2_illia_cam, 3);
151
   wait(.5);
155 argyle 152
 
153
 
151 argyle 154
   show_camera($cam3, $holo2_klingon_cam, 3);
155
   wait(.5);
169 argyle 156
   show_camera($cam6, $holo2_illia_cam2, 3);
157
   wait(.5);
177 argyle 158
   thread show_camera($cam5, $holo2_klingon_close_cam, 3);
169 argyle 159
   wait(.5);
177 argyle 160
 
161
   //Klingon talk
379 nemo22 162
   $klingon4.playdialog( "localization/sound/dialog/map01/Klingon/death.mp3", 1, 10000, 0);
177 argyle 163
 
379 nemo22 164
   wait(3);
177 argyle 165
   thread show_camera($cam4, $holo2_illia_close_cam, 3);
151 argyle 166
   wait(.5);
177 argyle 167
   $illia.playdialog("localization/sound/dialog/map01/Illia/youwillnotice.mp3", 1, 10000, 0);
168
   waitfordialog( $illia );
169
 
170
   wait(.5);
151 argyle 171
   //wait(5);
215 argyle 172
   thread finish_introcin();
166 argyle 173
}
151 argyle 174
 
166 argyle 175
void finish_introcin()
176
{
215 argyle 177
   cam_fadeout( .5, 0, 0, 0, 1, 0 );
178
   killthread ( "start_introcin" );
179
   wait ( .5 );
151 argyle 180
   noncinematic();
215 argyle 181
   releaseplayer();
151 argyle 182
   cueplayer ();
183
   clearletterbox(.1);
215 argyle 184
   cam_fadein( 1, 0, 0, 0, 1, 0 );
185
 
151 argyle 186
   $illia.hide();
154 argyle 187
   $illia.notsolid();
151 argyle 188
   $klingon1.ai_on();
189
   $klingon3.ai_on();
190
   $klingon4.ai_on();
191
   $klingon5.ai_on();
192
   $klingon6.ai_on();
193
   $klingon1.attack($player);
194
   $klingon3.attack($player);
195
   $klingon4.attack($player);
196
   $klingon5.attack($player);
197
   $klingon6.attack($player);
198
 
199
 
200
 
166 argyle 201
}
151 argyle 202
 
170 argyle 203
void start_holocin()
204
{
176 argyle 205
   $illi2.useactorweapon( "CompressionRifle" );
206
 
170 argyle 207
   cinematic();
215 argyle 208
   cam_fadeout( 1, 0, 0, 0, 1, 0 );
173 argyle 209
   spawn ( "Camera" , "targetname" , "holo_cam1" );
210
   spawn ( "Camera" , "targetname" , "holo_cam2" );
211
   spawn ( "Camera" , "targetname" , "holo_cam3" );
212
   spawn ( "Camera" , "targetname" , "holo_cam4" );
170 argyle 213
   wait ( .05 );
508 argyle 214
 
215
   /*
216
   cam.load("holo2_moya_cam2");
172 argyle 217
   cam.load("holo2_illia2_cam");
218
   cam.load("holo2_illia2_cam3");
508 argyle 219
   cam.load("holo2_moya_cam");
220
    */
170 argyle 221
 
177 argyle 222
   //Move holodeck door into holodeck
215 argyle 223
 
224
   wait ( 1);
225
   letterbox(.1);
177 argyle 226
   $holodeck_terminal.origin($terminal_new_origin.getOrigin());
227
 
215 argyle 228
   skipthread ( "finish_holocin" );
229
   freezeplayer();
230
 
177 argyle 231
   $moya.origin($moya_new_origin.getOrigin());
170 argyle 232
 
172 argyle 233
   //switch_off_ai();
170 argyle 234
 
172 argyle 235
   cam_fadeout( 1, 0, 0, 0, 1, 0 );
177 argyle 236
   wait(2);
170 argyle 237
 
173 argyle 238
   $holo_cam2.follow($holo2_illia2_cam);
239
   $death_klingon.show();
240
   $illia2.show();
241
   //$illia2.maxheadyaw(180);
176 argyle 242
   $illia2.headwatch( $death_klingon );
173 argyle 243
   $death_klingon.animateonce("long_death");
172 argyle 244
   wait(.1);
173 argyle 245
   cuecamera( $holo_cam2 );
176 argyle 246
   cam_fadein( 1, 0, 0, 0, 1, 0 );
215 argyle 247
   //$illi2.anim("compressionrifle_putaway");
176 argyle 248
   wait(5.5);
215 argyle 249
   //$illi2.anim("compressionrifle_putaway");
176 argyle 250
   //$holodeckdoor.open($holodeckdoor);
215 argyle 251
   $illia2.playsound("sound/ships/enterprise/holo_door_open.wav",1,1,500);
176 argyle 252
   wait(1);
173 argyle 253
   $illia2.headwatch( $moya );
254
 
176 argyle 255
   wait(2.5);
256
 
257
   $holo_cam1.follow($holo2_moya_cam2);
258
   wait(.1);
259
   cuecamera( $holo_cam1 );
260
   wait(1);
261
   $death_klingon.remove();
170 argyle 262
 
558 argyle 263
   //$moya2.walkto("$holodeck_nav1", "walk",0,-1);
264
   $moya2.walkto("$holodeck_nav1", "walk");
265
   //waitfor($moya);
266
   //$moya2.lookat($player);
176 argyle 267
   wait(3);
268
   //$holo_cam3.follow($holo2_illia2_cam);
269
   //cuecamera( $holo_cam3 );
270
   cuecamera( $holo_cam2 );
215 argyle 271
   $illia2.playsound("sound/ships/enterprise/holo_door_open.wav",1,1,500);
176 argyle 272
   $illia2.lookat( $moya);
273
   //$illia2.walkto("$battle_nav1", "walk",0,-1);
274
   //$illia2.resethead();
275
   //$illi2.useactorweapon( "none" );
276
   wait(3);
170 argyle 277
 
215 argyle 278
   thread finish_holocin();
176 argyle 279
 
215 argyle 280
 
170 argyle 281
}
282
 
283
 
284
 
176 argyle 285
void finish_holocin()
286
{
215 argyle 287
   cam_fadeout( .5, 0, 0, 0, 1, 0 );
288
   killthread ( "start_holocin" );
289
   wait ( .5 );
176 argyle 290
   noncinematic();
215 argyle 291
   releaseplayer();
176 argyle 292
   cueplayer ();
293
   clearletterbox(.1);
215 argyle 294
   $player.origin($new_player_pos.getOrigin());
295
   $player.playerviewangles('0 180 0');
176 argyle 296
   $illia2.hide();
297
   $illia2.notsolid();
827 lars 298
   globalCommon_Autosave();
215 argyle 299
   cam_fadein( 1, 0, 0, 0, 1, 0 );
176 argyle 300
 
301
}
302
 
177 argyle 303
void change_map()
304
{
219 lars 305
   	$illia2.playdialog("localization/sound/dialog/map01/illia/endprogram.mp3",1,10000,0);
306
   	waitfordialog($illia2);
379 nemo22 307
   	cam_fadeout( 1, 0, 0, 0, 1, 0 );
308
   	wait( 1 );
177 argyle 309
	stuffcmd("map map2 \n");
310
}
176 argyle 311
void inc_death_toll()
312
{
313
   killed_klingons++;
314
}
315
 
316
 
317
 
318
void spawn_melee_klingon( entity entity_to_spawn)
319
{
320
	entity e;
321
	string tiki_to_use;
322
	float random_number;
323
	random_number = randomint(5);
324
 
325
 
326
	if (random_number == 0) tiki_to_use = "char/klingon-m9-merc-batleth-m2.tik";
327
	if (random_number == 1) tiki_to_use = "char/klingon-m9-merc-knife-m2.tik";
328
	if (random_number == 2) tiki_to_use = "char/klingon-m9-merc-knife-m1.tik";
329
	if (random_number == 3) tiki_to_use = "char/klingon-m9-merc-knife-f3.tik";
330
	if (random_number == 4) tiki_to_use = "char/klingon-m9-merc-batleth-m1.tik";
331
	entity_to_spawn.modelname(tiki_to_use);
332
	entity_to_spawn.spawneffectname( "TransportIn", "Idryll" );
333
 
334
 
335
	entity_to_spawn.checkforspace();
336
	e = entity_to_spawn.spawnnow();
337
	wait( 0.05 );
508 argyle 338
	e.ai_off();
191 argyle 339
 
340
	if (!doesEntityExist( e)) { inc_death_toll(); }
215 argyle 341
	//e.attackplayer();
508 argyle 342
	e.killthread("inc_death_toll");
343
 
344
	wait(1);
215 argyle 345
	e.ai_on();
346
	e.attack( $player );
508 argyle 347
	//e.hurt(10);
348
 
176 argyle 349
}
350
 
351
 
352
void spawn_disrupter_klingon( entity entity_to_spawn)
353
{
354
	entity e;
355
	string tiki_to_use;
356
	float random_number;
357
 
358
	random_number = randomint(5);
359
 
360
	if (random_number == 0) tiki_to_use = "char/klingon-m9-merc-disruptor-m1.tik";
361
	if (random_number == 1) tiki_to_use = "char/klingon-m9-merc-disruptor-m2.tik";
362
	if (random_number == 1) tiki_to_use = "char/klingon-m9-merc-disruptor-m1.tik";
363
	if (random_number == 2) tiki_to_use = "char/klingon-m9-merc-disruptor-f1.tik";
364
	if (random_number == 3) tiki_to_use = "char/klingon-m9-merc-disruptor-f2.tik";
365
	if (random_number == 4) tiki_to_use = "char/klingon-m9-merc-disruptor-f3.tik";
366
	entity_to_spawn.modelname(tiki_to_use);
367
 
368
 
369
	entity_to_spawn.spawneffectname( "TransportIn", "Idryll" );
370
 
371
 
372
	entity_to_spawn.checkforspace();
373
	e = entity_to_spawn.spawnnow();
374
	wait( 0.05 );
508 argyle 375
	e.ai_off();
376
	e.killthread("inc_death_toll");
191 argyle 377
	if (!doesEntityExist( e)) { inc_death_toll(); }
215 argyle 378
	//e.attackplayer();
508 argyle 379
	wait(1);
215 argyle 380
	e.ai_on();
381
	e.attack( $player );
176 argyle 382
}
383
 
384
 
166 argyle 385
void main()
386
{
558 argyle 387
   //globalLoadout_AssignWeapons ( "m11l1a_drull_ruins3" );
388
   //globalLoadout_AssignWeapons ( "m3l1a_forever" );
389
 
390
   globalLoadout_GiveWeapon( WEAPON_PHASER_STX );
391
   globalLoadout_GiveWeapon( WEAPON_COMPRESSION_RIFLE );
392
   globalLoadout_GiveWeapon( WEAPON_ASSAULT_SHOTGUN );
883 lars 393
   $player.give( "models/weapons/worldmodel-batleth.tik" );
394
 
395
   $player.use( "batleth" );
166 argyle 396
 
215 argyle 397
   soundtrack( "music/m9l1a-klingon_base.mus" );
169 argyle 398
 
166 argyle 399
   $world.light_intensity( "lightning", 0 );
155 argyle 400
 
172 argyle 401
   $illia2.notsolid();
402
   $illia2.hide();
403
   $death_klingon.notsolid();
404
   $death_klingon.hide();
405
 
406
 
407
   switch_off_ai();
176 argyle 408
 
215 argyle 409
   float thread_number;
410
 
411
 
412
   thread_number = thread start_introcin();
413
   waitforthread(thread_number);
414
 
415
   wait(2);
416
   //finish_introcin();
417
 
176 argyle 418
   wait(1);
419
 
177 argyle 420
   while ( killed_klingons < 5 ) { wait(.5); }
176 argyle 421
 
422
 
423
   killed_klingons = 0;
508 argyle 424
   thread spawn_melee_klingon($wave1klingon1);
425
   thread spawn_melee_klingon($wave1klingon3);
426
   thread spawn_disrupter_klingon($wave1klingon2);
176 argyle 427
 
177 argyle 428
   while ( killed_klingons < 2 ) { wait(.5); }
176 argyle 429
 
508 argyle 430
   thread spawn_melee_klingon($wave2klingon1);
431
   thread spawn_melee_klingon($wave2klingon3);
432
   thread spawn_disrupter_klingon($wave2klingon2);
176 argyle 433
 
177 argyle 434
   while ( killed_klingons < 6 ) { wait(.5); }
176 argyle 435
 
177 argyle 436
   killed_klingons = 0;
508 argyle 437
   thread spawn_disrupter_klingon($wave3klingon1);
438
   thread spawn_melee_klingon($wave3klingon3);
439
   thread spawn_disrupter_klingon($wave3klingon2);
176 argyle 440
 
177 argyle 441
 
442
   while ( killed_klingons < 2 ) { wait(.5); }
508 argyle 443
   thread spawn_disrupter_klingon($wave4klingon1);
444
   thread spawn_disrupter_klingon($wave4klingon2);
177 argyle 445
 
446
   while ( killed_klingons < 5 ) { wait(.5); }
447
 
215 argyle 448
   forcemusic( "success" );
166 argyle 449
 
215 argyle 450
   wait(2);
451
 
452
   thread_number = thread start_holocin();
453
   waitforthread(thread_number);
454
 
177 argyle 455
   killed_klingons = 0;
508 argyle 456
   thread spawn_melee_klingon($newKlingon1);
457
   thread spawn_melee_klingon($newKlingon3);
458
   thread spawn_disrupter_klingon($newKlingon2);
459
   thread spawn_disrupter_klingon($newKlingon4);
170 argyle 460
 
177 argyle 461
   while ( killed_klingons < 4 ) { wait(.5); }
508 argyle 462
   thread spawn_melee_klingon($wave5klingon1);
463
   thread spawn_melee_klingon($wave5klingon2);
464
   thread spawn_melee_klingon($wave5klingon3);
177 argyle 465
   while ( killed_klingons < 7 ) { wait(.5); }
166 argyle 466
 
467
 
177 argyle 468
 
379 nemo22 469
   wait(2);
177 argyle 470
 
471
   change_map();
472
 
473
 
151 argyle 474
}