Subversion-Projekte sthq.gbs

Revision

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