/
MapScript.galaxy
9039 lines (8217 loc) · 380 KB
/
MapScript.galaxy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//==================================================================================================
//
// Generated Map Script
//
// Name: Lost Viking
//
//==================================================================================================
include "TriggerLibs/NativeLib"
include "TriggerLibs/CampaignLib"
//--------------------------------------------------------------------------------------------------
// Library Initialization
//--------------------------------------------------------------------------------------------------
void InitLibs () {
libNtve_InitLib();
libCamp_InitLib();
}
//--------------------------------------------------------------------------------------------------
// Constants
//--------------------------------------------------------------------------------------------------
const int gv_p0_NEUTRAL = 0;
const int gv_p1_USER = 1;
const int gv_p2_ENEMY = 2;
const int gv_p3_CINE = 3;
const fixed gv_c_PlaneHeight = 8.0;
const fixed gv_c_Pai = 3.1416;
const int gv_c_ScreenButton_Quit = 1;
const int gv_c_ScreenButton_Continue = 2;
const fixed gv_c_MouseHideWait = 4.0;
const fixed gv_c_ScoreBonus = 0.0;
const int gv_c_BonusLifeScore = 25000;
const fixed gv_c_LeviathanY = -3.5;
const fixed gv_c_TerraTronY = -1.0;
const fixed gv_terraTronArmAttackIntervalSmall = 0.125;
const fixed gv_c_BGHeight = 73.0;
const int gv_bossHPBarWidth = 800;
const int gv_bossHPBarInnerWidth = 782;
const int gv_unitHPBarWidth = 400;
const int gv_unitHPBarInnerWidth = 382;
const int gv_uI_LifeIconsMaxCount = 5;
const int gv_uI_BombIconsMaxCount = 15;
//--------------------------------------------------------------------------------------------------
// Global Structures
//--------------------------------------------------------------------------------------------------
struct gs_Rec_WaveInfo {
string lv_unitType;
int lv_count;
fixed lv_interval;
point lv_startPoint;
int lv_patten;
fixed lv_patternParam1;
fixed lv_patternParam2;
fixed lv_patternParam3;
fixed lv_patternParam4;
fixed lv_patternParam5;
fixed lv_patternParam6;
int lv_bullet;
bool lv_bulletTargetFighter;
};
//--------------------------------------------------------------------------------------------------
// Global Variables
//--------------------------------------------------------------------------------------------------
unit gv_viking;
int gv_repeatTimes;
bool gv_powerupScoreEnabled;
bool gv_debug_IsForDebug;
bool gv_debug_BossCheatEnabled;
int[6] gv_levelWavePlaneTypeCount;
string[6][11] gv_levelWavePlaneType;
string[6][11] gv_levelWavePlaneIcon;
text[6][11] gv_levelWavePlaneName;
int[6][11] gv_levelWaveShotDown;
string gv_levelLight;
unit[21] gv_level1Interceptors;
point[21] gv_level1InterceptorLocs;
int gv_level1InterceptorCurrentIndex;
int gv_level1InterceptorCount;
bool gv_level1BossRoundTimerExpires;
fixed gv_leviathanTentacleX;
bool gv_spawnLightningProjectors;
unit gv_spawnedLightningProjector;
fixed gv_terraTronScale;
point gv_terraTronPosition;
fixed gv_terraTronArmAttackInterval;
bool gv_alternateSpinAttack;
timer gv_missileSpinnerFireTimer;
unit gv_missileSpinnerL;
unit gv_missileSpinnerR;
point[8][3] gv_presetSawTargets;
point gv_screenUpperBound;
point gv_screenLowerBound;
point gv_lastSawPosition;
int gv_currentSawBounces;
int gv_totalSawBounces;
unit gv_terraTronSaw;
int gv_levelCurrent;
bool gv_levelCleared;
point gv_cameraLocation;
int[6] gv_selectedBackgroundIDs;
int gv_selectedBackgroundCount;
int gv_currentBackgroundIndex;
int gv_nextBackgroundIndex;
unit gv_backgroundCurrent;
unit gv_backgroundNext;
string[21] gv_backgroundUnitTypes;
int[21] gv_backgroundIDs;
point gv_bGStart;
point gv_bGStartNext;
point gv_bGTarget;
bool gv_bGPaused;
unitgroup gv_activeBackgroundUnits;
unitgroup gv_borderGroup;
gs_Rec_WaveInfo gv_tP_SendWave_WaveInfo;
unit gv_boss;
bool gv_bossStopped;
unit gv_mothership;
unitgroup gv_powerups;
string gv_powerupReady;
string[11] gv_powerupTypeUnitTypes;
string[11] gv_powerupTypeIcons;
text[11] gv_powerupTypeNames;
int gv_powerupTypeCount;
int[11] gv_powerupTypePickedUp;
int[11] gv_powerupTypePickedUpCurrent;
timer gv_powerupPickupTimer;
bool gv_fighterAttackKeyDown;
bool gv_fighterAttackEnabled;
bool gv_fighterMoveEnabled;
bool gv_fighterMoveDownKeyDown;
bool gv_fighterMoveUpKeyDown;
bool gv_fighterMoveRightKeyDown;
bool gv_fighterMoveLeftKeyDown;
bool gv_fighterMovingLeft;
int gv_fighterMovingDirection;
int gv_vikingLife;
int gv_bombCount;
int gv_extraLifeMulpitier;
int gv_scoreLastBonusLife;
int gv_levelStartLabelDialog;
int gv_levelStartLabelText;
int gv_controlTipDialog;
int gv_controlTipBG;
int gv_controlTipLabel1;
int gv_controlTipLabel2;
int gv_controlTipStartButton;
bool gv_controlTipStartButtonClicked;
int gv_score;
int gv_highScore;
int gv_levelTotalEnemy;
int gv_levelTotalPowerups;
int gv_scoreScreenCloseButton;
int gv_bossHPBarDlg;
int gv_bossHPBarLabelDlg;
int gv_bossHPBar;
int gv_unitHPBarDlg;
int gv_unitHPBarLabelDlg;
int gv_unitHPBarDialogBar;
unit gv_unitHPBarUnit;
timer gv_unitHPBarFadeTimer;
int gv_uI_Dlg;
int gv_uI_ScoreLabel;
int gv_uI_HighScoreTitle;
int gv_uI_HighScoreLabel;
int gv_uI_LifeLabel;
int gv_uI_LifeLabelLargeIcon;
int[11] gv_uI_LifeIcons;
int gv_uI_BombLabel;
int gv_uI_BombLabelLargeIcon;
int[16] gv_uI_BombIcons;
bool gv_recordBroke;
int gv_fadeDialog;
int gv_fadeImage;
int gv_gameResult;
bool gv_gameRestartFinished;
int gv_introFlashingLabel;
int gv_introFlashingShadow;
int gv_introFlashingPortrait;
unitgroup gv_endCinematicGroup;
unitgroup gv_endCinematicViking;
sound gv_endCinematicMusic;
unit gv_vikingCine;
int gv_endCineTextDialog;
void InitGlobals () {
int init_i;
gv_powerupScoreEnabled = true;
gv_debug_IsForDebug = true;
gv_spawnLightningProjectors = true;
gv_terraTronArmAttackInterval = (0.375 - (gv_terraTronArmAttackIntervalSmall * 2.0));
gv_missileSpinnerFireTimer = TimerCreate();
gv_screenUpperBound = Point(140.0, 134.0);
gv_screenLowerBound = Point(116.0, 120.0);
gv_bGPaused = true;
gv_activeBackgroundUnits = UnitGroupEmpty();
gv_borderGroup = UnitGroupEmpty();
gv_tP_SendWave_WaveInfo.lv_patten = 2;
gv_powerups = UnitGroupEmpty();
gv_powerupPickupTimer = TimerCreate();
gv_fighterAttackEnabled = true;
gv_fighterMoveEnabled = true;
gv_fighterMovingDirection = 2;
gv_vikingLife = 3;
gv_bombCount = 2;
gv_extraLifeMulpitier = 1;
gv_levelStartLabelDialog = c_invalidDialogId;
gv_levelStartLabelText = c_invalidDialogControlId;
gv_controlTipDialog = c_invalidDialogId;
gv_controlTipBG = c_invalidDialogControlId;
gv_controlTipLabel1 = c_invalidDialogControlId;
gv_controlTipLabel2 = c_invalidDialogControlId;
gv_controlTipStartButton = c_invalidDialogControlId;
gv_scoreScreenCloseButton = c_invalidDialogControlId;
gv_bossHPBarDlg = c_invalidDialogId;
gv_bossHPBarLabelDlg = c_invalidDialogId;
gv_bossHPBar = c_invalidDialogControlId;
gv_unitHPBarDlg = c_invalidDialogId;
gv_unitHPBarLabelDlg = c_invalidDialogId;
gv_unitHPBarDialogBar = c_invalidDialogControlId;
gv_unitHPBarFadeTimer = TimerCreate();
gv_uI_Dlg = c_invalidDialogId;
gv_uI_ScoreLabel = c_invalidDialogControlId;
gv_uI_HighScoreTitle = c_invalidDialogControlId;
gv_uI_HighScoreLabel = c_invalidDialogControlId;
gv_uI_LifeLabel = c_invalidDialogControlId;
gv_uI_LifeLabelLargeIcon = c_invalidDialogControlId;
for (init_i = 0; init_i <= 10; init_i += 1) {
gv_uI_LifeIcons[init_i] = c_invalidDialogControlId;
}
gv_uI_BombLabel = c_invalidDialogControlId;
gv_uI_BombLabelLargeIcon = c_invalidDialogControlId;
for (init_i = 0; init_i <= 15; init_i += 1) {
gv_uI_BombIcons[init_i] = c_invalidDialogControlId;
}
gv_fadeDialog = c_invalidDialogId;
gv_fadeImage = c_invalidDialogControlId;
gv_introFlashingLabel = c_invalidDialogControlId;
gv_introFlashingShadow = c_invalidDialogControlId;
gv_introFlashingPortrait = c_invalidPortraitId;
gv_endCinematicGroup = UnitGroupEmpty();
gv_endCinematicViking = UnitGroupEmpty();
gv_endCineTextDialog = c_invalidDialogId;
}
//--------------------------------------------------------------------------------------------------
// Global Function Declarations
//--------------------------------------------------------------------------------------------------
void gf_Debug_ShowPointInfo (text lp_name, point lp_point);
bool gf_IsForDebug ();
int gf_LevelShotDown (int lp_level);
int gf_NumberOfLevel ();
void gf_InitializeLevelScoreData ();
void gf_InitializeLevelWaveDataSingle (int lp_level, string lp_planeType, string lp_icon, text lp_name);
void gf_InitializeLevelWaveData ();
void gf_LevelStart (int lp_level);
void gf_LevelCleared (int lp_level, bool lp_withScoreScreen);
void gf_LevelPreload (int lp_level);
void gf_SpawnTrainingPowerups ();
void gf_Level1Preload ();
void gf_Level1Start ();
void gf_Level1SpawnWaves ();
void gf_Level1SpawnBoss ();
void gf_Level1Cleared ();
void gf_Level1ClearUp ();
void gf_Level1BossSpawnInterceptor (fixed lp_x, fixed lp_y);
void gf_Level1BossCarrierMove ();
void gf_Level2Preload ();
void gf_Level2Start ();
void gf_Level2SpawnWaves ();
void gf_Level2SpawnWavesScourgeDownBack (fixed lp_x1, fixed lp_x2, int lp_count, fixed lp_intervalMax);
void gf_Level2SpawnWavesScourgePatternFlyAway ();
void gf_Level2ScourgeSound ();
void gf_Level2SwarmGuardianMovement (unit lp_guardian, point lp_center);
void gf_Level2SpawnBoss ();
void gf_Level2Cleared ();
void gf_Level2ClearUp ();
void gf_Level2BossLeviathanSpawnBombs (int lp_count);
void gf_Level2BossLeviathanMove (fixed lp_x);
void gf_Level3Preload ();
void gf_Level3Start ();
void gf_Level3SpawnWaves ();
void gf_Level3SpawnWavesWraithGroupDrop (fixed lp_centerX, int lp_bullet, bool lp_targetViking);
void gf_Level3SpawnWavesWraithMassGroupDrop (int lp_count, int lp_bullet, bool lp_targetViking);
void gf_Level3SpawnWavesWraithGroupHMove (fixed lp_y, int lp_count, bool lp_leftToRight, fixed lp_speed, int lp_bullet);
void gf_Level3SpawnWavesWraithGroupVMove (fixed lp_x, int lp_count, fixed lp_speed, int lp_bullet);
void gf_Level3SpawnWavesWraithGroupDropBack (fixed lp_centerX);
void gf_SpawnSingleLightningProjector (bool lp_leftSide, fixed lp_moveSpeed, fixed lp_onTime, fixed lp_offTime);
void gf_SpawnLightningProjectors (int lp_numberOfProjectors, fixed lp_distanceApart, fixed lp_moveSpeed, fixed lp_onTime, fixed lp_offTime, bool lp_alternateLR);
void gf_Level3ScienceVesselMovement (unit lp_scienceVessel, point lp_center);
void gf_Level3BattlecruiserBehavior (unit lp_battlecruiser, point lp_center);
void gf_Level3SpawnBoss ();
void gf_Level3Cleared ();
void gf_Level3ClearUp ();
void gf_TerraTronLaunchMissile (fixed lp_xOffset, fixed lp_yOffset, fixed lp_facing, string lp_launchAttachPoint);
void gf_TerraTronRandomArmAttack ();
void gf_TerraTronArmAttackInToOut ();
void gf_TerraTronArmAttackOutToIn ();
void gf_TerraTronArmAttackLeftToRight ();
void gf_TerraTronArmAttackRightToLeft ();
void gf_TerraTronRandomBeamAttack ();
void gf_TerraTronBeamAttackLeftToRight ();
void gf_TerraTronBeamAttackRightToLeft ();
void gf_TerraTronSpawnMissileSpinners ();
point gf_GetNearestSawTarget (point lp_positionOfViking);
fixed gf_GetNormalFacing (point lp_sawPosition);
void gf_TerraTronSawAttack (int lp_bounces);
int gf_CurrentLevel ();
void gf_InitCamera ();
void gf_UpdateCameraBounds ();
region gf_GetCameraBoundary ();
region gf_GetOuterBoundary ();
point gf_ConvertShooterCoordToMapCoord (point lp_point);
fixed gf_ConvertShooterXToMapX (fixed lp_x);
fixed gf_ConvertShooterYToMapY (fixed lp_y);
void gf_InitBackground (int lp_bGID1, int lp_bGID2, int lp_bGID3, int lp_bGID4, int lp_bGID5);
void gf_StartBGMove ();
void gf_StopBGMove ();
unit gf_CurrentBackgroundUnit ();
unit gf_NextBackgroundUnit ();
string gf_BackgroundUnitType (int lp_iD);
bool gf_BGPaused ();
void gf_AddBackgroundUnitType (int lp_bGID);
void gf_CreateBackground (int lp_iD);
void gf_SetBackground (unit lp_bG);
void gf_SetBackgroundNext (unit lp_bG);
void gf_InitBackgroundDataSingle (int lp_iD, string lp_unitType);
void gf_InitBackgroundData ();
void gf_BGUpdatePosition ();
void gf_PrepareBorder ();
void gf_PrepareUnitForShooterGame (unit lp_unit);
void gf_SpawnMob (int lp_count, string lp_type, point lp_pos, fixed lp_angle);
text gf_GetMobUnitName (string lp_unitType);
void gf_SendWave (string lp_unitType, int lp_count, fixed lp_interval, point lp_startPoint, int lp_pattern, fixed lp_patternParam1, fixed lp_patternParam2, fixed lp_patternParam3, fixed lp_patternParam4, fixed lp_patternParam5, fixed lp_patternParam6, int lp_bullet, bool lp_targetFighter);
void gf_SendWaveMoveDrop (string lp_unitType, int lp_count, fixed lp_interval, fixed lp_startingX, fixed lp_startingY, fixed lp_turnX, fixed lp_turnY, fixed lp_speedInit, fixed lp_speed, fixed lp_delay, int lp_bullet, bool lp_targetFighter);
void gf_SendWaveStraightLine (string lp_unitType, int lp_count, fixed lp_interval, fixed lp_startingX, fixed lp_startingY, fixed lp_finishX, fixed lp_finishY, fixed lp_speed, int lp_bullet, bool lp_targetFighter);
void gf_SendWaveCorrectionMark (string lp_unitType, int lp_count, fixed lp_interval, fixed lp_startingX, fixed lp_startingY, fixed lp_turnX, fixed lp_turnY, fixed lp_finishX, fixed lp_finishY, fixed lp_speed, fixed lp_delay, int lp_bullet, bool lp_targetFighter);
void gf_SendWaveDropBack (string lp_unitType, int lp_count, fixed lp_interval, fixed lp_startingX, fixed lp_startingY, fixed lp_turnY, fixed lp_speed1, fixed lp_speed2, int lp_bullet, bool lp_targetFighter);
void gf_SendWaveCircle (string lp_unitType, int lp_count, fixed lp_interval, fixed lp_startingX, fixed lp_startingY, fixed lp_turnX, fixed lp_turnY, fixed lp_centerX, fixed lp_centerY, fixed lp_arc, fixed lp_arcSpeed, int lp_bullet, bool lp_targetFighter);
void gf_MobAttack (unit lp_mob, point lp_target);
void gf_MobSpawned (unit lp_mob);
void gf_ReadyToSpawnPowerup (string lp_unitType);
void gf_CreatePowerup (point lp_pos, string lp_type);
void gf_DespawnAllPowerupsOnMap ();
void gf_PowerupWonder (unit lp_powerup);
void gf_InitializePowerupDataSingle (string lp_type, string lp_icon, text lp_name);
void gf_InitializePowerupData ();
void gf_CreatePowerupTextTag (text lp_text, color lp_color);
void gf_FighterAttack ();
void gf_FighterEnableDisableAttack (bool lp_enableDisable);
void gf_FighterMove ();
void gf_FighterEnableDisableMove (bool lp_enableDisable);
void gf_CreateViking ();
void gf_FighterEnableDisableControl (bool lp_enableDisable);
void gf_DisplayBossComingMessage (text lp_warningMessage);
void gf_DisplayLevelStartLabel (int lp_level);
void gf_DestoryLevelStartLabel (bool lp_instant);
void gf_DisplayControlTip ();
void gf_HideControlTip (bool lp_instant);
void gf_AddScore (int lp_points);
void gf_SetHighScore (int lp_newHighScore);
int gf_ModifyScoreWithBonusMultiplier (int lp_points);
int gf_ScoreofUnitType (string lp_unitType);
void gf_ResetScoreTracking ();
void gf_ResetPowerupPickCount ();
void gf_DisplayScoreScreen (int lp_level);
void gf_DisplayBossHPBar (text lp_name);
void gf_DisplayUnitHPBar (text lp_name);
void gf_CreateUI ();
void gf_ShowHideUI (bool lp_showHide);
void gf_UpdateUI ();
void gf_FromatBackPlayButton (int lp_button);
void gf_FadeInOutWithPicture (bool lp_fadeIn, fixed lp_duration, bool lp_waitUntilDone);
void gf_FadeInOutSeperateThread (bool lp_fadeIn, fixed lp_duration, bool lp_waitUntilDone);
void gf_FadeInOutCore (bool lp_fadeIn, fixed lp_duration);
void gf_EndCinematicText ();
//--------------------------------------------------------------------------------------------------
// Trigger Variables
//--------------------------------------------------------------------------------------------------
trigger gt_InitPreload;
trigger gt_Init;
trigger gt_Debug_Sin;
trigger gt_Debug_LeaveBehind;
trigger gt_Debug_MoveBG;
trigger gt_Debug_BOSS;
trigger gt_Debug_LEVELCLEAR;
trigger gt_Debug_Bonus;
trigger gt_Debug_PowerUp;
trigger gt_Debug_Life;
trigger gt_Debug_Cineamtic;
trigger gt_Debug_SS;
trigger gt_Debug_AddScore;
trigger gt_Debug_HIDEQUIT;
trigger gt_Debug_ADDLIFE;
trigger gt_Level1SpawnWaves;
trigger gt_SpawnLevel1BossCarrier;
trigger gt_Level1BossCarrierDies;
trigger gt_Level1BossCarrierBehavior;
trigger gt_Level1BossInterceptorSpawned;
trigger gt_Level1BossInterceptorDied;
trigger gt_Level1BossRoundTimer;
trigger gt_Level2SpawnWaves;
trigger gt_SpawnLevel2BossLeviathan;
trigger gt_Level2BossLeviathanDies;
trigger gt_Level2BossLeviathanBehavior;
trigger gt_Level2BossLeviathanTentacle;
trigger gt_Level2BossLeviathanCharge;
trigger gt_Level3SpawnWaves;
trigger gt_SpawnLevel3BossTerraTron;
trigger gt_Level3BossTerraTronBehavior;
trigger gt_Level3BossTerraTronDies;
trigger gt_FireSpinMissiles;
trigger gt_InitializePresetSawTargets;
trigger gt_TerraTronSawSpawned;
trigger gt_TerraTronSawBehavior;
trigger gt_BackgroundManager;
trigger gt_SendWave;
trigger gt_SendWaveLeaveBehind;
trigger gt_SendWaveStraightLine;
trigger gt_SendWaveCorrectionMark;
trigger gt_SendWaveDownBack;
trigger gt_SendWaveMoveDrop;
trigger gt_SendWaveCircle;
trigger gt_SendWaveSine;
trigger gt_BossMovement;
trigger gt_SpawnMothership;
trigger gt_MothershipPlanetCracker;
trigger gt_MothershipDies;
trigger gt_SpawnPowerup;
trigger gt_PowerupPickUp;
trigger gt_FighterAttackKeyDown;
trigger gt_FighterAttackKeyUp;
trigger gt_FighterAttack;
trigger gt_FighterBombKeyDown;
trigger gt_FighterMoveLeftKeyDown;
trigger gt_FighterMoveLeftKeyUp;
trigger gt_FighterMoveRightKeyDown;
trigger gt_FighterMoveRightKeyUp;
trigger gt_FighterMoveUpKeyDown;
trigger gt_FighterMoveUpKeyUp;
trigger gt_FighterMoveDownKeyDown;
trigger gt_FighterMoveDownKeyUp;
trigger gt_FighterMove;
trigger gt_SpawnViking;
trigger gt_VikingDies;
trigger gt_VikingExtraLifes;
trigger gt_StartButtonClicked;
trigger gt_ScoreMobDies;
trigger gt_ScoreScreenCloseButtonClicked;
trigger gt_ScoreScreenSpacebarPressed;
trigger gt_BossHPBar;
trigger gt_BossDies;
trigger gt_UnitHPBar;
trigger gt_HPBarUnitDies;
trigger gt_FadeUnitHPBar;
trigger gt_RecordBrokeThread;
trigger gt_Victory;
trigger gt_Defeat;
trigger gt_PlayAgainClicked;
trigger gt_QuitClicked;
trigger gt_ReturnToGameClicked;
trigger gt_QuitQueryYetClicked;
trigger gt_QuitQueryNoClicked;
trigger gt_QuitButtonClicked;
trigger gt_EscapeKeyMenu;
trigger gt_IntroCinematic;
trigger gt_IntroCinematicSkippable;
trigger gt_SkipEndCinematic;
trigger gt_EndCinematic;
trigger gt_EndCinematicNotSkippable;
trigger gt_EndCinematicSkippable;
trigger gt_EndCinematicCamera;
trigger gt_EndCinematicViking;
trigger gt_EndCinematicDance;
trigger gt_EndCinematicMusic;
trigger gt_EndCinematicContinueButtonClicked;
//--------------------------------------------------------------------------------------------------
// Global Functions
//--------------------------------------------------------------------------------------------------
void gf_Debug_ShowPointInfo (text lp_name, point lp_point) {
// Implementation
if ((gf_IsForDebug() == false)) {
return ;
}
else {
}
UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, (lp_name + StringExternal("Param/Value/51EFF4C4") + FixedToText(PointGetX(lp_point), 2) + StringExternal("Param/Value/C5533173") + FixedToText(PointGetY(lp_point), 2) + StringExternal("Param/Value/ED0C4AD1")));
}
bool gf_IsForDebug () {
// Implementation
return gv_debug_IsForDebug;
}
int gf_LevelShotDown (int lp_level) {
int auto50CBBF6A_ae;
int auto50CBBF6A_ai;
// Variable Declarations
int lv_index;
int lv_count;
// Variable Initialization
// Implementation
auto50CBBF6A_ae = gv_levelWavePlaneTypeCount[(lp_level)];
auto50CBBF6A_ai = 1;
lv_index = 1;
for ( ; ( (auto50CBBF6A_ai >= 0 && lv_index <= auto50CBBF6A_ae) || (auto50CBBF6A_ai <= 0 && lv_index >= auto50CBBF6A_ae) ) ; lv_index += auto50CBBF6A_ai ) {
lv_count += gv_levelWaveShotDown[(lp_level)][lv_index];
}
return lv_count;
}
int gf_NumberOfLevel () {
// Implementation
return ((4) - 1);
}
void gf_InitializeLevelScoreData () {
int auto51959A84_ae;
int auto51959A84_ai;
int autoD11C92FC_ae;
int autoD11C92FC_ai;
// Variable Declarations
int lv_i;
int lv_k;
// Variable Initialization
// Implementation
auto51959A84_ae = 5;
auto51959A84_ai = 1;
lv_i = 1;
for ( ; ( (auto51959A84_ai >= 0 && lv_i <= auto51959A84_ae) || (auto51959A84_ai <= 0 && lv_i >= auto51959A84_ae) ) ; lv_i += auto51959A84_ai ) {
autoD11C92FC_ae = 10;
autoD11C92FC_ai = 1;
lv_k = 1;
for ( ; ( (autoD11C92FC_ai >= 0 && lv_k <= autoD11C92FC_ae) || (autoD11C92FC_ai <= 0 && lv_k >= autoD11C92FC_ae) ) ; lv_k += autoD11C92FC_ai ) {
gv_levelWaveShotDown[lv_i][lv_k] = 0;
}
}
}
void gf_InitializeLevelWaveDataSingle (int lp_level, string lp_planeType, string lp_icon, text lp_name) {
// Variable Declarations
int lv_index;
// Variable Initialization
// Implementation
gv_levelWavePlaneTypeCount[(lp_level)] += 1;
lv_index = gv_levelWavePlaneTypeCount[(lp_level)];
gv_levelWavePlaneType[(lp_level)][lv_index] = lp_planeType;
gv_levelWavePlaneIcon[(lp_level)][lv_index] = lp_icon;
gv_levelWavePlaneName[(lp_level)][lv_index] = lp_name;
gv_levelWaveShotDown[(lp_level)][lv_index] = 0;
}
void gf_InitializeLevelWaveData () {
// Variable Declarations
int lv_level;
// Variable Initialization
// Implementation
lv_level = 1;
gf_InitializeLevelWaveDataSingle(lv_level, "SS_Scout", "Assets\\Textures\\btn-unit-protoss-scout.dds", StringExternal("Param/Value/988B0012"));
gf_InitializeLevelWaveDataSingle(lv_level, "SS_Phoenix", "Assets\\Textures\\btn-unit-protoss-phoenix.dds", StringExternal("Param/Value/C843402E"));
gf_InitializeLevelWaveDataSingle(lv_level, "SS_Interceptor", "Assets\\Textures\\btn-unit-protoss-interceptor.dds", StringExternal("Param/Value/A34490F7"));
gf_InitializeLevelWaveDataSingle(lv_level, "SS_CarrierBoss", "Assets\\Textures\\btn-unit-protoss-carrier.dds", StringExternal("Param/Value/DFB9E62F"));
lv_level = 2;
gf_InitializeLevelWaveDataSingle(lv_level, "SS_Scourge", "Assets\\Textures\\btn-unit-zerg-scourge.dds", StringExternal("Param/Value/68411A21"));
gf_InitializeLevelWaveDataSingle(lv_level, "SS_Corruptor", "Assets\\Textures\\btn-unit-zerg-corruptor.dds", StringExternal("Param/Value/C8AEE86E"));
gf_InitializeLevelWaveDataSingle(lv_level, "SS_SwarmGuardian", "Assets\\Textures\\btn-lostvinking-swarmguardian.dds", StringExternal("Param/Value/B865CB24"));
gf_InitializeLevelWaveDataSingle(lv_level, "SS_Leviathan", "Assets\\Textures\\btn-unit-zerg-leviathan.dds", StringExternal("Param/Value/93645453"));
lv_level = 3;
gf_InitializeLevelWaveDataSingle(lv_level, "SS_Wraith", "Assets\\Textures\\btn-unit-terran-wraith.dds", StringExternal("Param/Value/BFAEAA12"));
gf_InitializeLevelWaveDataSingle(lv_level, "SS_ScienceVessel", "Assets\\Textures\\btn-unit-terran-sciencevessel.dds", StringExternal("Param/Value/AA2F3944"));
gf_InitializeLevelWaveDataSingle(lv_level, "SS_Battlecruiser", "Assets\\Textures\\btn-unit-terran-battlecruiser.dds", StringExternal("Param/Value/BED470AE"));
gf_InitializeLevelWaveDataSingle(lv_level, "SS_TerraTron", "Assets\\Textures\\btn-lostvinking-terra-tron.dds", StringExternal("Param/Value/D136CD59"));
}
void gf_LevelStart (int lp_level) {
// Implementation
gv_levelCurrent = lp_level;
gv_levelCleared = false;
gv_debug_BossCheatEnabled = false;
SoundtrackPlay(PlayerGroupAll(), c_soundtrackCategoryMusic, "LostViking_MusicGameLoop", c_soundtrackCueAny, c_soundtrackIndexAny, true);
gf_ResetScoreTracking();
gf_StartBGMove();
gf_UpdateUI();
gf_ShowHideUI(true);
Wait(0.5, c_timeGame);
TriggerExecute(gt_SpawnViking, true, false);
gf_FadeInOutWithPicture(true, 2.0, false);
gf_DisplayLevelStartLabel(lp_level);
gf_FighterEnableDisableControl(true);
TimerStart(gv_powerupPickupTimer, 0.0625, true, c_timeGame);
}
void gf_LevelCleared (int lp_level, bool lp_withScoreScreen) {
unitgroup auto49A2DDD7_g;
int auto49A2DDD7_u;
unitgroup auto6B9B76D8_g;
int auto6B9B76D8_u;
int auto10272E13_ae;
int auto10272E13_ai;
int auto9DCA9D7B_ae;
int auto9DCA9D7B_ai;
// Variable Declarations
unit lv_pickedUnit;
int lv_index;
point lv_pos;
// Variable Initialization
// Implementation
TimerPause(gv_powerupPickupTimer, true);
gv_powerupReady = null;
libNtve_gf_MakeUnitInvulnerable(gv_viking, true);
gf_Level1ClearUp();
gf_Level2ClearUp();
gf_Level3ClearUp();
auto49A2DDD7_g = UnitGroup(null, gv_p2_ENEMY, RegionEntireMap(), UnitFilter(0, 0, 0, (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto49A2DDD7_u = 1;
for ( ; auto49A2DDD7_u <= UnitGroupCount(auto49A2DDD7_g, c_unitCountAll) ; auto49A2DDD7_u += BoolToInt(lv_pickedUnit == UnitGroupUnit(auto49A2DDD7_g, auto49A2DDD7_u)) ) {
lv_pickedUnit = UnitGroupUnit(auto49A2DDD7_g, auto49A2DDD7_u);
UnitKill(lv_pickedUnit);
}
Wait(2.0, c_timeGame);
gf_FighterEnableDisableControl(false);
libNtve_gf_ClearAnimation(libNtve_gf_MainActorofUnit(gv_viking), c_animNameDefault);
auto6B9B76D8_g = UnitGroup(null, gv_p0_NEUTRAL, RegionEntireMap(), UnitFilter(0, 0, 0, (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto6B9B76D8_u = 1;
for ( ; auto6B9B76D8_u <= UnitGroupCount(auto6B9B76D8_g, c_unitCountAll) ; auto6B9B76D8_u += BoolToInt(lv_pickedUnit == UnitGroupUnit(auto6B9B76D8_g, auto6B9B76D8_u)) ) {
lv_pickedUnit = UnitGroupUnit(auto6B9B76D8_g, auto6B9B76D8_u);
auto10272E13_ae = gv_powerupTypeCount;
auto10272E13_ai = 1;
lv_index = 1;
for ( ; ( (auto10272E13_ai >= 0 && lv_index <= auto10272E13_ae) || (auto10272E13_ai <= 0 && lv_index >= auto10272E13_ae) ) ; lv_index += auto10272E13_ai ) {
if ((UnitGetType(lv_pickedUnit) == gv_powerupTypeUnitTypes[lv_index])) {
UnitRemove(lv_pickedUnit);
}
else {
}
}
}
Wait(2.0, c_timeGame);
SoundPlay(SoundLink("LostViking_Thrust", 0), PlayerGroupAll(), 100.0, 0.0);
lv_pos = UnitGetPosition(gv_viking);
auto9DCA9D7B_ae = 50;
auto9DCA9D7B_ai = 1;
lv_index = 1;
for ( ; ( (auto9DCA9D7B_ai >= 0 && lv_index <= auto9DCA9D7B_ae) || (auto9DCA9D7B_ai <= 0 && lv_index >= auto9DCA9D7B_ae) ) ; lv_index += auto9DCA9D7B_ai ) {
Wait(0.0125, c_timeGame);
UnitSetPosition(gv_viking, PointWithOffsetPolar(lv_pos, (0.8 * IntToFixed(lv_index)), 90.0), true);
}
gf_FadeInOutWithPicture(false, 1.5, true);
libNtve_gf_HideScreenButton(false, gv_c_ScreenButton_Quit);
if ((lp_withScoreScreen == true)) {
gf_DisplayScoreScreen(lp_level);
}
else {
}
}
void gf_LevelPreload (int lp_level) {
int autoB2FAD8C5_ae;
int autoB2FAD8C5_ai;
// Variable Declarations
int lv_index;
// Variable Initialization
// Implementation
autoB2FAD8C5_ae = gv_levelWavePlaneTypeCount[(lp_level)];
autoB2FAD8C5_ai = 1;
lv_index = 1;
for ( ; ( (autoB2FAD8C5_ai >= 0 && lv_index <= autoB2FAD8C5_ae) || (autoB2FAD8C5_ai <= 0 && lv_index >= autoB2FAD8C5_ae) ) ; lv_index += autoB2FAD8C5_ai ) {
libNtve_gf_PreloadUnit(gv_levelWavePlaneType[(lp_level)][lv_index], false);
}
}
void gf_SpawnTrainingPowerups () {
// Implementation
libNtve_gf_CreateUnitsWithDefaultFacing(1, "SS_PowerupSideMissiles", 0, 0, gf_ConvertShooterCoordToMapCoord(Point(1.5, -10.0)));
UnitBehaviorRemove(UnitLastCreated(), "SS_PowerupMorphToHealth", 1);
libNtve_gf_CreateUnitsWithDefaultFacing(1, "SS_PowerupSideMissiles", 0, 0, gf_ConvertShooterCoordToMapCoord(Point(3.5, -10.0)));
UnitBehaviorRemove(UnitLastCreated(), "SS_PowerupMorphToHealth", 1);
libNtve_gf_CreateUnitsWithDefaultFacing(1, "SS_PowerupHealth", 0, 0, gf_ConvertShooterCoordToMapCoord(Point(6.5, -10.0)));
UnitBehaviorRemove(UnitLastCreated(), "SS_PowerupMorphToStrongerMissiles", 1);
libNtve_gf_CreateUnitsWithDefaultFacing(1, "SS_PowerupHealth", 0, 0, gf_ConvertShooterCoordToMapCoord(Point(8.5, -10.0)));
UnitBehaviorRemove(UnitLastCreated(), "SS_PowerupMorphToStrongerMissiles", 1);
libNtve_gf_CreateUnitsWithDefaultFacing(1, "SS_PowerupStrongerMissiles", 0, 0, gf_ConvertShooterCoordToMapCoord(Point(11.5, -10.0)));
UnitBehaviorRemove(UnitLastCreated(), "SS_PowerupMorphToBomb", 1);
libNtve_gf_CreateUnitsWithDefaultFacing(1, "SS_PowerupStrongerMissiles", 0, 0, gf_ConvertShooterCoordToMapCoord(Point(13.5, -10.0)));
UnitBehaviorRemove(UnitLastCreated(), "SS_PowerupMorphToBomb", 1);
libNtve_gf_CreateUnitsWithDefaultFacing(1, "SS_PowerupBomb", 0, 0, gf_ConvertShooterCoordToMapCoord(Point(16.5, -10.0)));
UnitBehaviorRemove(UnitLastCreated(), "SS_PowerupMorphToSideMissiles", 1);
libNtve_gf_CreateUnitsWithDefaultFacing(1, "SS_PowerupBomb", 0, 0, gf_ConvertShooterCoordToMapCoord(Point(18.5, -10.0)));
UnitBehaviorRemove(UnitLastCreated(), "SS_PowerupMorphToSideMissiles", 1);
}
void gf_Level1Preload () {
}
void gf_Level1Start () {
// Implementation
if ((gv_gameResult != 0)) {
return ;
}
else {
}
PlayerSetColorIndex(gv_p2_ENEMY, 2, true);
gf_InitBackground(1, 2, 3, 4, 5);
GameSetBackground(c_backgroundFixed, "SS_BackgroundSpaceProtossLarge", 100.0);
gv_levelLight = "ArcadeSkyboxSpaceLight";
GameSetLighting(gv_levelLight, 0.0);
gf_LevelStart(1);
if ((gv_repeatTimes == 0)) {
gv_powerupScoreEnabled = false;
gf_SpawnTrainingPowerups();
gf_DisplayControlTip();
gf_DespawnAllPowerupsOnMap();
gv_bombCount = 2;
gv_powerupScoreEnabled = true;
UnitBehaviorRemove(gv_viking, "SS_PowerUpDiagonal1", 1);
UnitBehaviorRemove(gv_viking, "SS_PowerUpDiagonal2", 1);
UnitBehaviorRemove(gv_viking, "SS_PowerUpHealth1", 1);
UnitBehaviorRemove(gv_viking, "SS_PowerUpHealth2", 1);
UnitBehaviorRemove(gv_viking, "SS_PowerUpStrong", 2);
gf_UpdateUI();
}
else {
}
GameCheatAllow(c_gameCheatVictory, true);
gf_DestoryLevelStartLabel(false);
Wait(2.0, c_timeGame);
if ((gv_gameResult != 0) && (gv_gameResult != 4)) {
return ;
}
else {
}
if ((gv_levelCleared == false)) {
if ((gv_debug_BossCheatEnabled == false)) {
gf_Level1SpawnWaves();
}
else {
}
if ((gv_gameResult != 0) && (gv_gameResult != 4)) {
return ;
}
else {
}
if ((gv_levelCleared == false)) {
gf_Level1SpawnBoss();
if ((gv_gameResult != 0) && (gv_gameResult != 4)) {
return ;
}
else {
}
}
else {
}
}
else {
}
gf_Level1Cleared();
}
void gf_Level1SpawnWaves () {
// Implementation
TriggerExecute(gt_Level1SpawnWaves, true, true);
}
void gf_Level1SpawnBoss () {
// Implementation
gf_DisplayBossComingMessage(StringExternal("Param/Value/120ED966"));
TriggerExecute(gt_SpawnLevel1BossCarrier, true, false);
while (!((gv_levelCleared == true))) {
Wait(0.25, c_timeGame);
}
}
void gf_Level1Cleared () {
// Implementation
gf_LevelCleared(1, (gv_gameResult != 4));
}
void gf_Level1ClearUp () {
// Implementation
TriggerStop(gt_Level1SpawnWaves);
TriggerStop(gt_Level1BossCarrierBehavior);
TriggerStop(gt_Level1BossRoundTimer);
}
void gf_Level1BossSpawnInterceptor (fixed lp_x, fixed lp_y) {
int auto69EEA383_n;
int auto69EEA383_i;
// Variable Declarations
point lv_tempLoc;
// Variable Initialization
// Implementation
lv_tempLoc = Point(lp_x, lp_y);
lv_tempLoc = gf_ConvertShooterCoordToMapCoord(lv_tempLoc);
gv_level1InterceptorCount += 1;
gv_level1InterceptorCurrentIndex = gv_level1InterceptorCount;
gv_level1InterceptorLocs[gv_level1InterceptorCurrentIndex] = lv_tempLoc;
UnitIssueOrder(gv_boss, OrderTargetingPoint(AbilityCommand("SS_CarrierSpawnInterceptor", 0), lv_tempLoc), c_orderQueueReplace);
auto69EEA383_n = 4;
for (auto69EEA383_i = 1; auto69EEA383_i <= auto69EEA383_n; auto69EEA383_i += 1) {
Wait(0.5, c_timeGame);
if ((gv_level1InterceptorCurrentIndex <= 0)) {
break;
}
else {
}
}
}
void gf_Level1BossCarrierMove () {
// Variable Declarations
region lv_bounds;
point lv_targetLoc;
// Variable Initialization
// Implementation
if ((UnitIsAlive(gv_boss) == false)) {
return ;
}
else {
}
lv_targetLoc = Point(RandomFixed(4.0, 16.0), RandomFixed(-0.5, -5.0));
lv_targetLoc = gf_ConvertShooterCoordToMapCoord(lv_targetLoc);
UnitIssueOrder(gv_boss, OrderTargetingPoint(AbilityCommand("move", 0), lv_targetLoc), c_orderQueueReplace);
Wait(0.5, c_timeGame);
while (!((UnitTestState(gv_boss, c_unitStateIdle) == true))) {
Wait(0.5, c_timeGame);
}
}
void gf_Level2Preload () {
}
void gf_Level2Start () {
// Implementation
if ((gv_gameResult != 0)) {
return ;
}
else {
}
PlayerSetColorIndex(gv_p2_ENEMY, 1, true);
gf_InitBackground(6, 7, 8, 0, 0);
GameSetBackground(c_backgroundFixed, "SS_BackgroundSpaceZergLarge", 100.0);
gv_levelLight = "ArcadeSkyboxSpaceLight";
GameSetLighting(gv_levelLight, 0.0);
gf_LevelStart(2);
Wait(7.0, c_timeGame);
gf_DestoryLevelStartLabel(false);
if ((gv_gameResult != 0) && (gv_gameResult != 4)) {
return ;
}
else {
}
if ((gv_levelCleared == false)) {
if ((gv_debug_BossCheatEnabled == false)) {
gf_Level2SpawnWaves();
}
else {
}
if ((gv_gameResult != 0) && (gv_gameResult != 4)) {
return ;
}
else {
}
if ((gv_levelCleared == false)) {
gf_Level2SpawnBoss();
if ((gv_gameResult != 0) && (gv_gameResult != 4)) {
return ;
}
else {
}
}
else {
}
}
else {
}
gf_Level2Cleared();
}
void gf_Level2SpawnWaves () {
// Implementation
TriggerExecute(gt_Level2SpawnWaves, true, true);
}
trigger auto_gf_Level2SpawnWavesScourgeDownBack_Trigger = null;
fixed auto_gf_Level2SpawnWavesScourgeDownBack_lp_x1;
fixed auto_gf_Level2SpawnWavesScourgeDownBack_lp_x2;
int auto_gf_Level2SpawnWavesScourgeDownBack_lp_count;
fixed auto_gf_Level2SpawnWavesScourgeDownBack_lp_intervalMax;
void gf_Level2SpawnWavesScourgeDownBack (fixed lp_x1, fixed lp_x2, int lp_count, fixed lp_intervalMax) {
auto_gf_Level2SpawnWavesScourgeDownBack_lp_x1 = lp_x1;
auto_gf_Level2SpawnWavesScourgeDownBack_lp_x2 = lp_x2;
auto_gf_Level2SpawnWavesScourgeDownBack_lp_count = lp_count;
auto_gf_Level2SpawnWavesScourgeDownBack_lp_intervalMax = lp_intervalMax;
if (auto_gf_Level2SpawnWavesScourgeDownBack_Trigger == null) {
auto_gf_Level2SpawnWavesScourgeDownBack_Trigger = TriggerCreate("auto_gf_Level2SpawnWavesScourgeDownBack_TriggerFunc");
}
TriggerExecute(auto_gf_Level2SpawnWavesScourgeDownBack_Trigger, false, false);
}
bool auto_gf_Level2SpawnWavesScourgeDownBack_TriggerFunc (bool testConds, bool runActions) {
fixed lp_x1 = auto_gf_Level2SpawnWavesScourgeDownBack_lp_x1;
fixed lp_x2 = auto_gf_Level2SpawnWavesScourgeDownBack_lp_x2;
int lp_count = auto_gf_Level2SpawnWavesScourgeDownBack_lp_count;
fixed lp_intervalMax = auto_gf_Level2SpawnWavesScourgeDownBack_lp_intervalMax;
int auto65881B2D_ae;
int auto65881B2D_ai;
// Variable Declarations
int lv_index;
fixed lv_speed;
fixed lv_speed1;
fixed lv_intervalTime;
// Variable Initialization
lv_intervalTime = -1.0;
// Implementation
lv_speed = 7.0;
lv_speed1 = 3.0;
auto65881B2D_ae = lp_count;
auto65881B2D_ai = 1;
lv_index = 1;
for ( ; ( (auto65881B2D_ai >= 0 && lv_index <= auto65881B2D_ae) || (auto65881B2D_ai <= 0 && lv_index >= auto65881B2D_ae) ) ; lv_index += auto65881B2D_ai ) {
gf_SendWave("SS_Scourge", 1, 0.0, Point(RandomFixed(lp_x1, lp_x2), 1.0), 3, RandomFixed(-11.0, -14.0), 0.0, 0.0, 0.0, lv_speed, lv_speed1, 0, false);
if ((lv_intervalTime < 0.0)) {
lv_intervalTime = RandomFixed(0.0, lp_intervalMax);
Wait(lv_intervalTime, c_timeGame);
}
else {
lv_intervalTime = (lp_intervalMax - lv_intervalTime);
Wait(lv_intervalTime, c_timeGame);
lv_intervalTime = -1.0;
}
}
return true;
}
trigger auto_gf_Level2SpawnWavesScourgePatternFlyAway_Trigger = null;
void gf_Level2SpawnWavesScourgePatternFlyAway () {
if (auto_gf_Level2SpawnWavesScourgePatternFlyAway_Trigger == null) {
auto_gf_Level2SpawnWavesScourgePatternFlyAway_Trigger = TriggerCreate("auto_gf_Level2SpawnWavesScourgePatternFlyAway_TriggerFunc");
}
TriggerExecute(auto_gf_Level2SpawnWavesScourgePatternFlyAway_Trigger, false, false);
}
bool auto_gf_Level2SpawnWavesScourgePatternFlyAway_TriggerFunc (bool testConds, bool runActions) {
int auto4F469A0C_ae;
int auto4F469A0C_ai;
int auto7F30F6AF_ae;
int auto7F30F6AF_ai;
int autoD7E0F7A2_ae;
int autoD7E0F7A2_ai;
int auto68C96E7E_ae;
int auto68C96E7E_ai;
// Variable Declarations
fixed lv_y;
fixed lv_x;
fixed lv_xOff1;
fixed lv_xOff2;
fixed lv_yOff1;
fixed lv_yOff2;
int lv_index;
fixed lv_wait;
fixed lv_speed;
fixed lv_speed1;
// Variable Initialization
lv_xOff1 = -2.0;