//---------------------------------------------------------------------------
// Script file for the level 3 of the Chemical plant sabotage
// Geoffroy Audy, October 21th 1996
//---------------------------------------------------------------------------
define  PASS       0
define  GUN1       1
define  DOOR       2
define  WINDOW1    3
define  WINDOW2    4
define  BIGYELLO1  5
define  BIGYELLO2  6
define  BIGYELLO3  7
define  BIGYELLO4  8
define  BIGYELLO5  9
define  BIGYELLO6  10
define  BIGYELLO7  11
define  BIGYELLO8  12
define  BIGYELLO9  13
define  BIGYELLO10 14
define  BIGYELLO11 15
define  YELLOW1    16
define  YELLOW2    17
define  YELLOW3    18
define  YELLOW4    19
define  YELLOW5    20
define  YELLOW6    21
define  YELLOW7    22
define  YELLOW8    23
define  YELLOW9    24
define  YELLOW10   25
define  YELLOW11   26
define  YELLOW12   27
define  YELLOW13   28
define  YELLOW14   29
define  YELLOW15   30
define  YELLOW16   31
define  YELLOW17   32
define  YELLOW18   33
define  YELLOW19   34
define  YELLOW20   35
define  YELLOW21   36
define  YELLOW22   37
define  YELLOW23   38
define  YELLOW24   39
define  YELLOW25   40
define  YELLOW26   41
define  YELLOW27   42
define  YELLOW28   43
define  YELLOW29   44
define  YELLOW30   45
define  YELLOW31   46
define  YELLOW32   47
define  YELLOW33   48
define  YELLOW34   49
define  YELLOW35   50
define  YELLOW36   51
define  YELLOW37   52
define  YELLOW38   53
define  CHEMY1     54
define  CHEMY2     55
define  CHEMY3     56
define  CHEMY4     57
define  CHEMY5     58
define  CHEMY6     59
define  CHEMY7     60
define  CHEMY8     61
define  CHEMY9     62
define  CHEMY10    63
define  CHEMY11    64
define  CHEMY12    65
define  CHEMY13    66
define  CHEMY14    67
define  CHEMY15    68
define  CHEMY16    69
define  CHEMY17    70
define  CHEMY18    71
define  CHEMY19    72
define  CHEMY20    73
define  PATCH1     74
define  PATCH2     75
define  PATCH3     76
define  BOX1       77
define  BOX2       78
define  BOX3       79
define  FORKLIFT   80
define  GUN2       81
define  ROPE1      82
define  ROPE2      83
define  ROPE3      84

define  L1         0            // Difficulty levels
define  L2         1
define  L3         2
define  L4         3
define  L5         4
define  L6         5
define  L7         6
define  L8         7

//-------------------------------------
// Start initialization
//-------------------------------------
loadBKD \BACKGRND\CHEMICAL\CHEMICL1.BKD         // BKD 0        Inst. 0
setBKDLoc 0 0 0 0                               //
loadVAB \SOUNDFX\CHEMICAL.VAB                   // Sound fx

loadKRT \SPRITES\CHEMICAL\LEVEL1\PASS.KRT       // Char 0
SetTotalHitPoints PASS 4                        //
ObjectCharacteristics PASS 1152                 // Char 0 is a falling object
loadKRT \SPRITES\CHEMICAL\LEVEL1\WEAPON1.KRT    // Char 1
ObjectCharacteristics GUN1 1032                 // Char 1 is a gun
loadKRT \SPRITES\CHEMICAL\LEVEL1\DOOR3.KRT      // Char 2
ObjectCharacteristics DOOR 1152                 // Char 2 is an object
loadKRT \SPRITES\CHINATWN\LEVEL1\LEVEL1_1\BIGWIN.KRT ///CHEMICAL\LEVEL1\WINDOW.KRT     // Char 3
ObjectCharacteristics WINDOW1 1060              // Char 3 is a window
CloneCharacter WINDOW1                          // Char 4
SetScale WINDOW1 4600
loadKRT \SPRITES\CHEMICAL\LEVEL1\BIGYELLO.KRT   // Char 5
CloneCharacter BIGYELLO1                        // Char 6
CloneCharacter BIGYELLO1                        // Char 7
CloneCharacter BIGYELLO1                        // Char 8
CloneCharacter BIGYELLO1                        // Char 9
CloneCharacter BIGYELLO1                        // Char 10
CloneCharacter BIGYELLO1                        // Char 11
CloneCharacter BIGYELLO1                        // Char 12
CloneCharacter BIGYELLO1                        // Char 13
CloneCharacter BIGYELLO1                        // Char 14
CloneCharacter BIGYELLO1                        // Char 15
loadKRT \SPRITES\CHEMICAL\LEVEL1\YELLOW.KRT     // Char 16
CloneCharacter YELLOW1                          // Char 17
CloneCharacter YELLOW1                          // Char 18
CloneCharacter YELLOW1                          // Char 19
CloneCharacter YELLOW1                          // Char 20
CloneCharacter YELLOW1                          // Char 21
CloneCharacter YELLOW1                          // Char 22
CloneCharacter YELLOW1                          // Char 23
CloneCharacter YELLOW1                          // Char 24
CloneCharacter YELLOW1                          // Char 25
CloneCharacter YELLOW1                          // Char 26
CloneCharacter YELLOW1                          // Char 27
CloneCharacter YELLOW1                          // Char 28
CloneCharacter YELLOW1                          // Char 29
CloneCharacter YELLOW1                          // Char 30
CloneCharacter YELLOW1                          // Char 31
CloneCharacter YELLOW1                          // Char 32
CloneCharacter YELLOW1                          // Char 33
CloneCharacter YELLOW1                          // Char 34
CloneCharacter YELLOW1                          // Char 35
CloneCharacter YELLOW1                          // Char 36
CloneCharacter YELLOW1                          // Char 37
CloneCharacter YELLOW1                          // Char 38
CloneCharacter YELLOW1                          // Char 39
CloneCharacter YELLOW1                          // Char 40
CloneCharacter YELLOW1                          // Char 41
CloneCharacter YELLOW1                          // Char 42
CloneCharacter YELLOW1                          // Char 43
CloneCharacter YELLOW1                          // Char 44
CloneCharacter YELLOW1                          // Char 45
CloneCharacter YELLOW1                          // Char 46
CloneCharacter YELLOW1                          // Char 47
CloneCharacter YELLOW1                          // Char 48
CloneCharacter YELLOW1                          // Char 49
CloneCharacter YELLOW1                          // Char 50
CloneCharacter YELLOW1                          // Char 51
CloneCharacter YELLOW1                          // Char 52
CloneCharacter YELLOW1                          // Char 53
SetScale YELLOW3 3600
SetScale YELLOW5 4800
SetScale YELLOW6 3000
SetScale YELLOW7 3000
SetScale YELLOW8 4200
SetScale YELLOW10 3000
SetScale YELLOW11 3000
SetScale YELLOW12 3000
SetScale YELLOW13 3000
SetScale YELLOW15 3000
SetScale YELLOW16 3000
SetScale YELLOW18 3200
SetScale YELLOW19 3000
SetScale YELLOW20 3000
SetScale YELLOW21 3000
SetScale YELLOW22 3000
SetScale YELLOW25 4800
SetScale YELLOW26 3000
SetScale YELLOW27 3000
SetScale YELLOW30 3000
SetScale YELLOW33 3000
SetScale YELLOW34 3000
SetScale YELLOW36 3000
SetScale YELLOW38 3000
loadKRT \SPRITES\CHEMICAL\LEVEL1\CHEMY.KRT      // Char 54
CloneCharacter CHEMY1                           // Char 55
CloneCharacter CHEMY1                           // Char 56
CloneCharacter CHEMY1                           // Char 57
CloneCharacter CHEMY1                           // Char 58
CloneCharacter CHEMY1                           // Char 59
CloneCharacter CHEMY1                           // Char 60
CloneCharacter CHEMY1                           // Char 61
CloneCharacter CHEMY1                           // Char 62
CloneCharacter CHEMY1                           // Char 63
CloneCharacter CHEMY1                           // Char 64
CloneCharacter CHEMY1                           // Char 65
CloneCharacter CHEMY1                           // Char 66
CloneCharacter CHEMY1                           // Char 67
CloneCharacter CHEMY1                           // Char 68
CloneCharacter CHEMY1                           // Char 69
CloneCharacter CHEMY1                           // Char 70
CloneCharacter CHEMY1                           // Char 71
CloneCharacter CHEMY1                           // Char 72
CloneCharacter CHEMY1                           // Char 73
SetScale CHEMY1 2800
SetScale CHEMY2 3800
SetScale CHEMY3 4300
SetScale CHEMY4 2800
SetScale CHEMY5 3800
SetScale CHEMY7 4300
SetScale CHEMY12 3800
SetScale CHEMY18 4500
loadKRT \SPRITES\CHEMICAL\LEVEL1\PATCH.KRT      // Char 74
ObjectCharacteristics PATCH1 1028               //
CloneCharacter PATCH1                           // Char 75
CloneCharacter PATCH1                           // Char 76
loadKRT \SPRITES\CHEMICAL\LEVEL1\CRATE.KRT      // Char 77
ObjectCharacteristics BOX1 1030                 //
CloneCharacter BOX1                             // Char 78
CloneCharacter BOX1                             // Char 79
loadKRT \SPRITES\CHEMICAL\LEVEL1\FORK.KRT       // Char 80
ObjectCharacteristics FORKLIFT 17414            //
CloneCharacter GUN1                             // Char 81
loadKRT \SPRITES\CHEMICAL\LEVEL1\ROPE.KRT       // Char 82
ObjectCharacteristics ROPE1 17924               //
CloneCharacter ROPE1                            // Char 83
CloneCharacter ROPE1                            // Char 84
SetDepth ROPE1 11
SetDepth ROPE2 11
SetDepth ROPE3 11

PlayTrack 508 1                   // Play STAGE6

Link DOOR CHEMY2 1 6 0 0 153 133
Link DOOR CHEMY2 3 7 0 0 172 133
Link DOOR CHEMY2 3 8 0 0 172 133
Link DOOR CHEMY12 1 6 0 0 153 133
Link DOOR CHEMY12 3 7 0 0 172 133
Link DOOR CHEMY12 3 8 0 0 172 133
Link ROPE1 YELLOW9 0 12 0 0 75 -35
Link ROPE2 YELLOW29 0 12 0 0 405 -35
Link ROPE3 YELLOW35 0 12 0 0 390 -35
Link ROPE1 YELLOW9  1 14 0 0 75 0
Link ROPE2 YELLOW29 1 14 0 0 405 0
Link ROPE3 YELLOW35 1 14 0 0 390 0

//-------------------------------------
// Various objects
//-------------------------------------
StartActionXY PASS       0 249 69   6    0 0 L1
StartActionXY DOOR       0 153 133  6    0 0 L1
StartActionXY WINDOW1    0  25 116  4    0 0 L1
StartActionXY WINDOW2    0  90 112  4    0 0 L1
StartActionXY PATCH1     0  34  87  2    0 0 L1
StartActionXY PATCH2     1  90  87  2    0 0 L1
StartActionXY PATCH3     2 155  84  2    0 0 L1

//-------------------------------------
// Enemy group #1
//-------------------------------------
StartActionXY YELLOW1    7 140 200  9   60 1 L1
StartActionXY YELLOW2    3 275 210  9  120 0 L1
StartActionXY YELLOW3    5   0 145  3  180 0 L1
StartActionXY CHEMY1     4 290 145  3  240 1 L1
StartActionXY BOX1       0 -20 175 12  300 0 L1
Attach        GUN1       BOX1  3 0 301 -100 30 11 L1    ///action 0
StartActionXY YELLOW4    5 320 185  9  360 1 L1
StartActionXY CHEMY2     6 100 153  3  420 0 L1
Attach        YELLOW5    BOX1 10 1 480 0 10 11 L1
StartActionXY YELLOW6    9 345  50  1  540 1 L1
StartActionXY BIGYELLO1  0  90 290 14  600 0 L1
StartActionXY CHEMY3     6  70 210  9  660 0 L1
StartActionXY YELLOW7    3 150  65  1  720 0 L1
StartActionXY CHEMY4     4 190 150  3  780 0 L1
StartActionXY YELLOW8    3  65 220  9  840 1 L1
Attach        YELLOW9  ROPE1 12 0 900 -8 40 12 L1
StartActionXY YELLOW10   3 150  65  1  960 0 L1
StartActionXY YELLOW11   9 325  50  1 1020 1 L1
StartActionXY BIGYELLO2  0 240 290 14 1080 0 L1
StartActionXY CHEMY5     0  35 170  3 1140 0 L1
StartActionXY YELLOW12   9  -5  50  1 1200 0 L1
StartActionXY FORKLIFT   0 -25 150  9 1260 0 L1
StartActionXY CHEMY6     0 290 205  9 1320 0 L1
StartActionXY YELLOW13   3 100  65  1 1380 0 L1
//Attach        YELLOW14   FORKLIFT 3 0 1440 50 50 8 L1
StartActionXY YELLOW15   3  50  65  1 1500 0 L1
StartActionXY YELLOW16   3 150  65  1 1560 0 L1
StartActionXY BIGYELLO3  0 240 290 14 1620 0 L1
StartActionXY CHEMY7     0 275 210  9 1680 0 L1
StartActionXY BIGYELLO4  0 240 290 14 1740 0 L1
StopAction YELLOW5 1741

ScrollBKDTo 0 -111 0 111 1760

//-------------------------------------
// Enemy group #2
//-------------------------------------
StartActionXY BIGYELLO5  0 200 290 14 1800 0 L1
StartActionXY CHEMY8     0 165 190  9 1860 1 L1
StartActionXY YELLOW17   3 205 190  8 1920 0 L1
StartActionXY CHEMY9     0 330 200  9 1980 1 L1
StartActionXY YELLOW18   5 175 140  3 2040 0 L1
StartActionXY CHEMY10    0 385 165  9 2100 0 L1
StartActionXY CHEMY11    0 415 190  9 2160 0 L1
StartActionXY YELLOW19   5 110  60  1 2220 0 L1
StartActionXY YELLOW20   9 435  50  1 2280 1 L1
StartActionXY CHEMY12    6 100 153  3 2340 0 L1
StartActionXY BIGYELLO6  0 355 290 14 2400 0 L1
StartActionXY CHEMY13    6 135 190  9 2460 0 L1
StartActionXY YELLOW21   9 435  50  1 2520 1 L1
StartActionXY YELLOW22   9 105  50  1 2580 0 L1
StartActionXY YELLOW23   3 330 205  9 2640 0 L1
StartActionXY BIGYELLO7  0 240 290 14 2700 0 L1
StartActionXY BOX2       0  70 175 12 2760 0 L1
StartActionXY CHEMY14    6 355 215  9 2820 1 L1
StartActionXY YELLOW24   3 385 170  9 2880 1 L1
Attach        YELLOW25   BOX2 7 0 2940 15 12 11 L1
StartActionXY YELLOW26   9 325  50  1 3000 1 L1
StartActionXY CHEMY15    0 195 200  9 3060 0 L1
StartActionXY YELLOW27   9 105  50  1 3120 0 L1
StartActionXY BIGYELLO8  0 210 290 14 3180 0 L1
StopAction YELLOW25 3181

ScrollBKDTo 0 -280 0 169 3240

//-------------------------------------
// Enemy group #3
//-------------------------------------
StartActionXY BIGYELLO9  0 335 290 14 3300 0 L1
StartActionXY YELLOW28   3 485 205  9 3360 0 L1
StartActionXY CHEMY16    0 385 165  9 3420 0 L1
Attach        YELLOW29 ROPE2 12 0 3480 -8 40 12 L1
StartActionXY BOX3       0 255 175 12 3540 0 L1
Attach        GUN2 BOX3  1 0 3541 -100 30 11 L1
StartActionXY YELLOW30   9 610  50  1 3600 1 L1
StartActionXY CHEMY17    6 595 210  9 3660 1 L1
Attach        CHEMY18    BOX3 0 0 3720 0 0 11 L1
StartActionXY YELLOW31   3 330 205  9 3780 0 L1
StartActionXY BIGYELLO10 0 485 290 14 3840 0 L1
StartActionXY YELLOW32   3 525 210  9 3900 0 L1
StartActionXY CHEMY19    0 545 175  4 3960 0 L1
StartActionXY CHEMY20    6 405 205  9 4020 0 L1
StartActionXY YELLOW33   5 340  50  1 4080 0 L1
Attach        YELLOW35 ROPE3 12 0 4200 -8 40 12 L1
StartActionXY YELLOW36   5 595  50  1 4260 1 L1
StartActionXY BIGYELLO11 0 350 290 14 4320 0 L1
StartActionXY YELLOW37   3 315 205  9 4380 0 L1
StopAction CHEMY18 4381

ScrollBKDTo 0 -280 0 0 4440

EndRound 4441
