From FSG Wiki
Back to Main Page
// ********************************* ENNEMIES *****************************************
Element none EnnemyBodyLVL1 255 0 0 0 1 1 1 0 Clear 0 TEXT "EnnemyBodyLVL1"
Element none EnnemyBodyLVL2 0 255 0 0 1 1 1 0 Clear 0 TEXT "EnnemyBody"
Interaction Fire EnnemyBodyLVL1 Fire Fire 1000
InteractionTrigger EnnemyBodyLVL1 Earth <EXEC explosion1 2 100 100 50 0 0 ELEMENT:Fire 10> 32768
// ELEMENTID REPLACEELEMENTID X Y WIDTH HEIGHT
REMOVETRIGGER REPLACEFILLEDRECT
ON REPLACEFILLEDRECT SET tmp 0
ON REPLACEFILLEDRECT WHILE (tmp < $5) REPLACEFILLEDRECT2
REMOVETRIGGER REPLACEFILLEDRECT2
ON REPLACEFILLEDRECT2 DRAW $0 REPLACELINE $2 ($3 + tmp) $4 0 $1
ON REPLACEFILLEDRECT2 SET tmp (tmp + 1)
REMOVETRIGGER RESETLVL1ENNEMY
ON RESETLVL1ENNEMY TIMER CLEAR
ON RESETLVL1ENNEMY EXEC REPLACEFILLEDRECT ELEMENT:Clear ELEMENT:EnnemyBodyLVL1 0 0 WIDTH HEIGHT
ON RESETLVL1ENNEMY SET EnnemyX_LVL1 0
ON RESETLVL1ENNEMY SET EnnemyY_LVL1 0
ON RESETLVL1ENNEMY EXEC SETDestroyable
ON RESETLVL1ENNEMY EXEC NEWDrawEnnemy 210 210
ON RESETLVL1ENNEMY SET EnnemyLVL1Frozen 0
ON RESETLVL1ENNEMY SET EnnemyLVL1Alive 1
ON RESETLVL1ENNEMY EXEC debugmenu
ON RESETLVL1ENNEMY EXEC MoveEnnemy1
// $0=FREEZE TIME IN FRAMES
REMOVETRIGGER FREEZEENNEMY_LVL1
ON FREEZEENNEMY_LVL1 TIMER $0 FRAMES UNFREEZEENNEMY_LVL1
ON FREEZEENNEMY_LVL1 SET EnnemyLVL1Frozen 1
REMOVETRIGGER UNFREEZEENNEMY_LVL1
ON UNFREEZEENNEMY_LVL1 SET EnnemyLVL1Frozen 0
// $0=EnnemyX $1=EnnemyY $2=EnnemyLevel
REMOVETRIGGER MoveEnnemy1
ON MoveEnnemy1 IF ((EnnemyLVL1Frozen == 0) && (EnnemyLVL1Alive == 1)) MoveEnnemyLVL1
ON MoveEnnemy1 TIMER 2 FRAMES MoveEnnemy1
REMOVETRIGGER MoveEnnemyLVL1
ON MoveEnnemyLVL1 SET NewRandom1 0
ON MoveEnnemyLVL1 SET NewRandom2 0
ON MoveEnnemyLVL1 IF (((MoveToX + 1) == EnnemyX_LVL1) || (MoveToX == EnnemyX_LVL1) || ((MoveToX - 1) == EnnemyX_LVL1)) <SET NewRandom1 1>
ON MoveEnnemyLVL1 IF (((MoveToY + 1) == EnnemyY_LVL1) || (MoveToY == EnnemyY_LVL1) || ((MoveToY - 1) == EnnemyY_LVL1)) <SET NewRandom2 1>
ON MoveEnnemyLVL1 IF ((NewRandom1 == 1) && (NewRandom2 == 1)) <SET MoveToX (1 RAND WIDTH)>
ON MoveEnnemyLVL1 IF ((NewRandom1 == 1) && (NewRandom2 == 1)) <SET MoveToY (1 RAND HEIGHT)>
ON MoveEnnemyLVL1 EXEC GET_SHOTGUN_ANGLE EnnemyX_LVL1 EnnemyY_LVL1 MoveToX MoveToY
ON MoveEnnemyLVL1 EXEC MOVETOWARDYOU_LVL1
ON MoveEnnemyLVL1 EXEC BORDERCHECKLVL1
ON MoveEnnemyLVL1 IF ((EnnemyLVL1Alive == 1) && (EnnemyLVL1Frozen == 0)) RedrawEnnemy
REMOVETRIGGER MOVETOWARDYOU_LVL1
ON MOVETOWARDYOU_LVL1 SET E.LVL1.MOVEX ((tmpX * (-3)) / tmp)
ON MOVETOWARDYOU_LVL1 SET E.LVL1.MOVEY ((tmpY * (-3)) / tmp)
ON MOVETOWARDYOU_LVL1 SET NewEnnemyX_LVL1 (EnnemyX_LVL1 + E.LVL1.MOVEX)
ON MOVETOWARDYOU_LVL1 SET NewEnnemyY_LVL1 (EnnemyY_LVL1 + E.LVL1.MOVEY)
REMOVETRIGGER MOVEAWAYFROMYOU_LVL1
ON MOVEAWAYFROMYOU_LVL1 SET E.LVL1.MOVEX ((tmpX * (3)) / tmp)
ON MOVEAWAYFROMYOU_LVL1 SET E.LVL1.MOVEY ((tmpY * (3)) / tmp)
ON MOVEAWAYFROMYOU_LVL1 SET NewEnnemyX_LVL1 (EnnemyX_LVL1 + E.LVL1.MOVEX)
ON MOVEAWAYFROMYOU_LVL1 SET NewEnnemyY_LVL1 (EnnemyY_LVL1 + E.LVL1.MOVEY)
REMOVETRIGGER BORDERCHECKLVL1
ON BORDERCHECKLVL1 IF (NewEnnemyX_LVL1 > WIDTH) <SET NewEnnemyX_LVL1 5>
ON BORDERCHECKLVL1 IF (NewEnnemyX_LVL1 < 0) <SET NewEnnemyX_LVL1 (WIDTH - 5)>
ON BORDERCHECKLVL1 IF (NewEnnemyY_LVL1 > HEIGHT) <SET NewEnnemyY_LVL1 5>
ON BORDERCHECKLVL1 IF (NewEnnemyY_LVL1 < 0) <SET NewEnnemyY_LVL1 (HEIGHT - 5)>
REMOVETRIGGER GET_SHOTGUN_ANGLE
ON GET_SHOTGUN_ANGLE SET tmpX ($0 - $2)
ON GET_SHOTGUN_ANGLE SET tmpY ($1 - $3)
ON GET_SHOTGUN_ANGLE SET tmp (SQRT ((tmpX * tmpX) + (tmpY * tmpY)))
REMOVETRIGGER SETDestroyable
ON SETDestroyable SET DestroyedPixel:1 0
ON SETDestroyable SET DestroyedPixel:2 0
ON SETDestroyable SET DestroyedPixel:3 0
ON SETDestroyable SET DestroyedPixel:4 0
ON SETDestroyable SET DestroyedPixel:5 0
ON SETDestroyable SET DestroyedPixel:6 0
ON SETDestroyable SET DestroyedPixel:7 0
ON SETDestroyable SET DestroyedPixel:8 0
ON SETDestroyable SET DestroyedPixel:9 0
ON SETDestroyable SET DestroyedPixel:10 0
ON SETDestroyable SET DestroyedPixel:11 0
ON SETDestroyable SET DestroyedPixel:12 0
ON SETDestroyable SET DestroyedPixel:13 0
ON SETDestroyable SET DestroyedPixel:14 0
ON SETDestroyable SET DestroyedPixel:15 0
ON SETDestroyable SET DestroyedPixel:16 0
ON SETDestroyable SET DestroyedPixel:17 0
ON SETDestroyable SET DestroyedPixel:18 0
ON SETDestroyable SET DestroyedPixel:19 0
ON SETDestroyable SET DestroyedPixel:20 0
ON SETDestroyable SET DestroyedPixel:21 0
ON SETDestroyable SET DestroyedPixel:22 0
ON SETDestroyable SET DestroyedPixel:23 0
ON SETDestroyable SET DestroyedPixel:24 0
ON SETDestroyable SET DestroyedPixel:25 0
ON SETDestroyable SET DestroyedPixel:26 0
ON SETDestroyable SET DestroyedPixel:27 0
ON SETDestroyable SET DestroyedPixel:28 0
ON SETDestroyable SET DestroyedPixel:29 0
ON SETDestroyable SET DestroyedPixel:30 0
ON SETDestroyable SET DestroyedPixel:31 0
ON SETDestroyable SET DestroyedPixel:32 0
ON SETDestroyable SET DestroyedPixel:33 0
ON SETDestroyable SET DestroyedPixel:34 0
ON SETDestroyable SET DestroyedPixel:35 0
ON SETDestroyable SET DestroyedPixel:36 0
ON SETDestroyable SET DestroyedPixel:37 0
ON SETDestroyable SET DestroyedPixel:38 0
ON SETDestroyable SET DestroyedPixel:39 0
ON SETDestroyable SET DestroyedPixel:40 0
ON SETDestroyable SET DestroyedPixel:41 0
ON SETDestroyable SET DestroyedPixel:42 0
ON SETDestroyable SET DestroyedPixel:43 0
ON SETDestroyable SET DestroyedPixel:44 0
ON SETDestroyable SET DestroyedPixel:45 0
ON SETDestroyable SET DestroyedPixel:46 0
ON SETDestroyable SET DestroyedPixel:47 0
ON SETDestroyable SET DestroyedPixel:48 0
ON SETDestroyable SET DestroyedPixel:49 0
ON SETDestroyable SET DestroyedPixel:50 0
ON SETDestroyable SET DestroyedPixel:51 0
ON SETDestroyable SET DestroyedPixel:52 0
ON SETDestroyable SET DestroyedPixel:53 0
ON SETDestroyable SET DestroyedPixel:54 0
ON SETDestroyable SET DestroyedPixel:55 0
ON SETDestroyable SET DestroyedPixel:56 0
ON SETDestroyable SET DestroyedPixel:57 0
ON SETDestroyable SET DestroyedPixel:58 0
ON SETDestroyable SET DestroyedPixel:59 0
ON SETDestroyable SET DestroyedPixel:60 0
ON SETDestroyable SET DestroyedPixel:61 0
ON SETDestroyable SET DestroyedPixel:62 0
ON SETDestroyable SET DestroyedPixel:63 0
ON SETDestroyable SET DestroyedPixel:64 0
ON SETDestroyable SET DestroyedPixel:65 0
ON SETDestroyable SET DestroyedPixel:66 0
ON SETDestroyable SET DestroyedPixel:67 0
ON SETDestroyable SET DestroyedPixel:68 0
ON SETDestroyable SET DestroyedPixel:69 0
ON SETDestroyable SET DestroyedPixel:70 0
ON SETDestroyable SET DestroyedPixel:71 0
ON SETDestroyable SET DestroyedPixel:72 0
ON SETDestroyable SET DestroyedPixel:73 0
ON SETDestroyable SET DestroyedPixel:74 0
ON SETDestroyable SET DestroyedPixel:75 0
ON SETDestroyable SET DestroyedPixel:76 0
ON SETDestroyable SET DestroyedPixel:77 0
ON SETDestroyable SET DestroyedPixel:78 0
ON SETDestroyable SET DestroyedPixel:79 0
ON SETDestroyable SET DestroyedPixel:80 0
ON SETDestroyable SET DestroyedPixel:81 0
ON SETDestroyable SET DestroyedPixel:82 0
ON SETDestroyable SET DestroyedPixel:83 0
ON SETDestroyable SET DestroyedPixel:84 0
ON SETDestroyable SET DestroyedPixel:85 0
ON SETDestroyable SET DestroyedPixel:86 0
ON SETDestroyable SET DestroyedPixel:87 0
ON SETDestroyable SET DestroyedPixel:88 0
ON SETDestroyable SET DestroyedPixel:89 0
ON SETDestroyable SET DestroyedPixel:90 0
ON SETDestroyable SET DestroyedPixel:91 0
ON SETDestroyable SET DestroyedPixel:92 0
ON SETDestroyable SET DestroyedPixel:93 0
ON SETDestroyable SET DestroyedPixel:94 0
ON SETDestroyable SET DestroyedPixel:95 0
ON SETDestroyable SET DestroyedPixel:96 0
// StartX,StartY
REMOVETRIGGER CheckDestroyed
ON CheckDestroyed IF ((($0 + 1) PIXEL ($1 - 4)) == ELEMENT:Clear) <SET DestroyedPixel:1 1>
ON CheckDestroyed IF ((($0 + 2) PIXEL ($1 - 4)) == ELEMENT:Clear) <SET DestroyedPixel:2 1>
ON CheckDestroyed IF ((($0 + 3) PIXEL ($1 - 4)) == ELEMENT:Clear) <SET DestroyedPixel:3 1>
ON CheckDestroyed IF ((($0 + 4) PIXEL ($1 - 4)) == ELEMENT:Clear) <SET DestroyedPixel:4 1>
ON CheckDestroyed IF ((($0 + 1) PIXEL ($1 - 3)) == ELEMENT:Clear) <SET DestroyedPixel:5 1>
ON CheckDestroyed IF ((($0 + 2) PIXEL ($1 - 3)) == ELEMENT:Clear) <SET DestroyedPixel:6 1>
ON CheckDestroyed IF ((($0 + 3) PIXEL ($1 - 3)) == ELEMENT:Clear) <SET DestroyedPixel:7 1>
ON CheckDestroyed IF ((($0 + 4) PIXEL ($1 - 3)) == ELEMENT:Clear) <SET DestroyedPixel:8 1>
ON CheckDestroyed IF ((($0 + 1) PIXEL ($1 - 2)) == ELEMENT:Clear) <SET DestroyedPixel:9 1>
ON CheckDestroyed IF ((($0 + 2) PIXEL ($1 - 2)) == ELEMENT:Clear) <SET DestroyedPixel:10 1>
ON CheckDestroyed IF ((($0 + 3) PIXEL ($1 - 2)) == ELEMENT:Clear) <SET DestroyedPixel:11 1>
ON CheckDestroyed IF ((($0 + 4) PIXEL ($1 - 2)) == ELEMENT:Clear) <SET DestroyedPixel:12 1>
ON CheckDestroyed IF ((($0 + 1) PIXEL ($1 - 1)) == ELEMENT:Clear) <SET DestroyedPixel:13 1>
ON CheckDestroyed IF ((($0 + 2) PIXEL ($1 - 1)) == ELEMENT:Clear) <SET DestroyedPixel:14 1>
ON CheckDestroyed IF ((($0 + 3) PIXEL ($1 - 1)) == ELEMENT:Clear) <SET DestroyedPixel:15 1>
ON CheckDestroyed IF ((($0 + 4) PIXEL ($1 - 1)) == ELEMENT:Clear) <SET DestroyedPixel:16 1>
ON CheckDestroyed IF ((($0 + 1) PIXEL ($1)) == ELEMENT:Clear) <SET DestroyedPixel:17 1>
ON CheckDestroyed IF ((($0 + 2) PIXEL ($1)) == ELEMENT:Clear) <SET DestroyedPixel:18 1>
ON CheckDestroyed IF ((($0 + 3) PIXEL ($1)) == ELEMENT:Clear) <SET DestroyedPixel:19 1>
ON CheckDestroyed IF ((($0 + 4) PIXEL ($1)) == ELEMENT:Clear) <SET DestroyedPixel:20 1>
ON CheckDestroyed IF ((($0 - 4) PIXEL ($1 + 1)) == ELEMENT:Clear) <SET DestroyedPixel:21 1>
ON CheckDestroyed IF ((($0 - 3) PIXEL ($1 + 1)) == ELEMENT:Clear) <SET DestroyedPixel:22 1>
ON CheckDestroyed IF ((($0 - 2) PIXEL ($1 + 1)) == ELEMENT:Clear) <SET DestroyedPixel:23 1>
ON CheckDestroyed IF ((($0 - 1) PIXEL ($1 + 1)) == ELEMENT:Clear) <SET DestroyedPixel:24 1>
ON CheckDestroyed IF ((($0 - 0) PIXEL ($1 + 1)) == ELEMENT:Clear) <SET DestroyedPixel:25 1>
ON CheckDestroyed IF ((($0 + 1) PIXEL ($1 + 1)) == ELEMENT:Clear) <SET DestroyedPixel:26 1>
ON CheckDestroyed IF ((($0 + 2) PIXEL ($1 + 1)) == ELEMENT:Clear) <SET DestroyedPixel:27 1>
ON CheckDestroyed IF ((($0 + 3) PIXEL ($1 + 1)) == ELEMENT:Clear) <SET DestroyedPixel:28 1>
ON CheckDestroyed IF ((($0 + 4) PIXEL ($1 + 1)) == ELEMENT:Clear) <SET DestroyedPixel:29 1>
ON CheckDestroyed IF ((($0 + 5) PIXEL ($1 + 1)) == ELEMENT:Clear) <SET DestroyedPixel:30 1>
ON CheckDestroyed IF ((($0 + 6) PIXEL ($1 + 1)) == ELEMENT:Clear) <SET DestroyedPixel:31 1>
ON CheckDestroyed IF ((($0 + 7) PIXEL ($1 + 1)) == ELEMENT:Clear) <SET DestroyedPixel:32 1>
ON CheckDestroyed IF ((($0 + 8) PIXEL ($1 + 1)) == ELEMENT:Clear) <SET DestroyedPixel:33 1>
ON CheckDestroyed IF ((($0 + 9) PIXEL ($1 + 1)) == ELEMENT:Clear) <SET DestroyedPixel:34 1>
ON CheckDestroyed IF ((($0 - 4) PIXEL ($1 + 2)) == ELEMENT:Clear) <SET DestroyedPixel:35 1>
ON CheckDestroyed IF ((($0 - 3) PIXEL ($1 + 2)) == ELEMENT:Clear) <SET DestroyedPixel:36 1>
ON CheckDestroyed IF ((($0 - 2) PIXEL ($1 + 2)) == ELEMENT:Clear) <SET DestroyedPixel:37 1>
ON CheckDestroyed IF ((($0 - 1) PIXEL ($1 + 2)) == ELEMENT:Clear) <SET DestroyedPixel:38 1>
ON CheckDestroyed IF ((($0 - 0) PIXEL ($1 + 2)) == ELEMENT:Clear) <SET DestroyedPixel:39 1>
ON CheckDestroyed IF ((($0 + 1) PIXEL ($1 + 2)) == ELEMENT:Clear) <SET DestroyedPixel:40 1>
ON CheckDestroyed IF ((($0 + 2) PIXEL ($1 + 2)) == ELEMENT:Clear) <SET DestroyedPixel:41 1>
ON CheckDestroyed IF ((($0 + 3) PIXEL ($1 + 2)) == ELEMENT:Clear) <SET DestroyedPixel:42 1>
ON CheckDestroyed IF ((($0 + 4) PIXEL ($1 + 2)) == ELEMENT:Clear) <SET DestroyedPixel:43 1>
ON CheckDestroyed IF ((($0 + 5) PIXEL ($1 + 2)) == ELEMENT:Clear) <SET DestroyedPixel:44 1>
ON CheckDestroyed IF ((($0 + 6) PIXEL ($1 + 2)) == ELEMENT:Clear) <SET DestroyedPixel:45 1>
ON CheckDestroyed IF ((($0 + 7) PIXEL ($1 + 2)) == ELEMENT:Clear) <SET DestroyedPixel:46 1>
ON CheckDestroyed IF ((($0 + 8) PIXEL ($1 + 2)) == ELEMENT:Clear) <SET DestroyedPixel:47 1>
ON CheckDestroyed IF ((($0 + 9) PIXEL ($1 + 2)) == ELEMENT:Clear) <SET DestroyedPixel:48 1>
ON CheckDestroyed IF ((($0 - 4) PIXEL ($1 + 3)) == ELEMENT:Clear) <SET DestroyedPixel:49 1>
ON CheckDestroyed IF ((($0 - 3) PIXEL ($1 + 3)) == ELEMENT:Clear) <SET DestroyedPixel:50 1>
ON CheckDestroyed IF ((($0 - 2) PIXEL ($1 + 3)) == ELEMENT:Clear) <SET DestroyedPixel:51 1>
ON CheckDestroyed IF ((($0 - 1) PIXEL ($1 + 3)) == ELEMENT:Clear) <SET DestroyedPixel:52 1>
ON CheckDestroyed IF ((($0 - 0) PIXEL ($1 + 3)) == ELEMENT:Clear) <SET DestroyedPixel:53 1>
ON CheckDestroyed IF ((($0 + 1) PIXEL ($1 + 3)) == ELEMENT:Clear) <SET DestroyedPixel:54 1>
ON CheckDestroyed IF ((($0 + 2) PIXEL ($1 + 3)) == ELEMENT:Clear) <SET DestroyedPixel:55 1>
ON CheckDestroyed IF ((($0 + 3) PIXEL ($1 + 3)) == ELEMENT:Clear) <SET DestroyedPixel:56 1>
ON CheckDestroyed IF ((($0 + 4) PIXEL ($1 + 3)) == ELEMENT:Clear) <SET DestroyedPixel:57 1>
ON CheckDestroyed IF ((($0 + 5) PIXEL ($1 + 3)) == ELEMENT:Clear) <SET DestroyedPixel:58 1>
ON CheckDestroyed IF ((($0 + 6) PIXEL ($1 + 3)) == ELEMENT:Clear) <SET DestroyedPixel:59 1>
ON CheckDestroyed IF ((($0 + 7) PIXEL ($1 + 3)) == ELEMENT:Clear) <SET DestroyedPixel:60 1>
ON CheckDestroyed IF ((($0 + 8) PIXEL ($1 + 3)) == ELEMENT:Clear) <SET DestroyedPixel:61 1>
ON CheckDestroyed IF ((($0 + 9) PIXEL ($1 + 3)) == ELEMENT:Clear) <SET DestroyedPixel:62 1>
ON CheckDestroyed IF ((($0 - 4) PIXEL ($1 + 4)) == ELEMENT:Clear) <SET DestroyedPixel:63 1>
ON CheckDestroyed IF ((($0 - 3) PIXEL ($1 + 4)) == ELEMENT:Clear) <SET DestroyedPixel:64 1>
ON CheckDestroyed IF ((($0 - 2) PIXEL ($1 + 4)) == ELEMENT:Clear) <SET DestroyedPixel:65 1>
ON CheckDestroyed IF ((($0 - 1) PIXEL ($1 + 4)) == ELEMENT:Clear) <SET DestroyedPixel:66 1>
ON CheckDestroyed IF ((($0 - 0) PIXEL ($1 + 4)) == ELEMENT:Clear) <SET DestroyedPixel:67 1>
ON CheckDestroyed IF ((($0 + 1) PIXEL ($1 + 4)) == ELEMENT:Clear) <SET DestroyedPixel:68 1>
ON CheckDestroyed IF ((($0 + 2) PIXEL ($1 + 4)) == ELEMENT:Clear) <SET DestroyedPixel:69 1>
ON CheckDestroyed IF ((($0 + 3) PIXEL ($1 + 4)) == ELEMENT:Clear) <SET DestroyedPixel:70 1>
ON CheckDestroyed IF ((($0 + 4) PIXEL ($1 + 4)) == ELEMENT:Clear) <SET DestroyedPixel:71 1>
ON CheckDestroyed IF ((($0 + 5) PIXEL ($1 + 4)) == ELEMENT:Clear) <SET DestroyedPixel:72 1>
ON CheckDestroyed IF ((($0 + 6) PIXEL ($1 + 4)) == ELEMENT:Clear) <SET DestroyedPixel:73 1>
ON CheckDestroyed IF ((($0 + 7) PIXEL ($1 + 4)) == ELEMENT:Clear) <SET DestroyedPixel:74 1>
ON CheckDestroyed IF ((($0 + 8) PIXEL ($1 + 4)) == ELEMENT:Clear) <SET DestroyedPixel:75 1>
ON CheckDestroyed IF ((($0 + 9) PIXEL ($1 + 4)) == ELEMENT:Clear) <SET DestroyedPixel:76 1>
ON CheckDestroyed IF ((($0 + 1) PIXEL ($1 + 5)) == ELEMENT:Clear) <SET DestroyedPixel:77 1>
ON CheckDestroyed IF ((($0 + 2) PIXEL ($1 + 5)) == ELEMENT:Clear) <SET DestroyedPixel:78 1>
ON CheckDestroyed IF ((($0 + 3) PIXEL ($1 + 5)) == ELEMENT:Clear) <SET DestroyedPixel:79 1>
ON CheckDestroyed IF ((($0 + 4) PIXEL ($1 + 5)) == ELEMENT:Clear) <SET DestroyedPixel:80 1>
ON CheckDestroyed IF ((($0 + 1) PIXEL ($1 + 6)) == ELEMENT:Clear) <SET DestroyedPixel:81 1>
ON CheckDestroyed IF ((($0 + 2) PIXEL ($1 + 6)) == ELEMENT:Clear) <SET DestroyedPixel:82 1>
ON CheckDestroyed IF ((($0 + 3) PIXEL ($1 + 6)) == ELEMENT:Clear) <SET DestroyedPixel:83 1>
ON CheckDestroyed IF ((($0 + 4) PIXEL ($1 + 6)) == ELEMENT:Clear) <SET DestroyedPixel:84 1>
ON CheckDestroyed IF ((($0 + 1) PIXEL ($1 + 7)) == ELEMENT:Clear) <SET DestroyedPixel:85 1>
ON CheckDestroyed IF ((($0 + 2) PIXEL ($1 + 7)) == ELEMENT:Clear) <SET DestroyedPixel:86 1>
ON CheckDestroyed IF ((($0 + 3) PIXEL ($1 + 7)) == ELEMENT:Clear) <SET DestroyedPixel:87 1>
ON CheckDestroyed IF ((($0 + 4) PIXEL ($1 + 7)) == ELEMENT:Clear) <SET DestroyedPixel:88 1>
ON CheckDestroyed IF ((($0 + 1) PIXEL ($1 + 8)) == ELEMENT:Clear) <SET DestroyedPixel:89 1>
ON CheckDestroyed IF ((($0 + 2) PIXEL ($1 + 8)) == ELEMENT:Clear) <SET DestroyedPixel:90 1>
ON CheckDestroyed IF ((($0 + 3) PIXEL ($1 + 8)) == ELEMENT:Clear) <SET DestroyedPixel:91 1>
ON CheckDestroyed IF ((($0 + 4) PIXEL ($1 + 8)) == ELEMENT:Clear) <SET DestroyedPixel:92 1>
ON CheckDestroyed IF ((($0 + 1) PIXEL ($1 + 9)) == ELEMENT:Clear) <SET DestroyedPixel:93 1>
ON CheckDestroyed IF ((($0 + 2) PIXEL ($1 + 9)) == ELEMENT:Clear) <SET DestroyedPixel:94 1>
ON CheckDestroyed IF ((($0 + 3) PIXEL ($1 + 9)) == ELEMENT:Clear) <SET DestroyedPixel:95 1>
ON CheckDestroyed IF ((($0 + 4) PIXEL ($1 + 9)) == ELEMENT:Clear) <SET DestroyedPixel:96 1>
REMOVETRIGGER NEWDrawEnnemy
ON NEWDrawEnnemy EXEC REPLACEFILLEDRECT ELEMENT:Clear ELEMENT:EnnemyBodyLVL1 ($0 - 10) ($1 - 10) 25 25
ON NEWDrawEnnemy IF (DestroyedPixel:1 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 1) ($1 - 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:2 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 2) ($1 - 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:3 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 3) ($1 - 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:4 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 4) ($1 - 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:5 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 1) ($1 - 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:6 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 2) ($1 - 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:7 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 3) ($1 - 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:8 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 4) ($1 - 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:9 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 1) ($1 - 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:10 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 2) ($1 - 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:11 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 3) ($1 - 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:12 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 4) ($1 - 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:13 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 1) ($1 - 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:14 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 2) ($1 - 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:15 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 3) ($1 - 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:16 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 4) ($1 - 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:17 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 1) ($1 - 0) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:18 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 2) ($1 - 0) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:19 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 3) ($1 - 0) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:20 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 4) ($1 - 0) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:21 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 4) ($1 + 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:22 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 3) ($1 + 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:23 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 2) ($1 + 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:24 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 1) ($1 + 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:25 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 0) ($1 + 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:26 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 1) ($1 + 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:27 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 2) ($1 + 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:28 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 3) ($1 + 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:29 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 4) ($1 + 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:30 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 5) ($1 + 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:31 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 6) ($1 + 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:32 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 7) ($1 + 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:33 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 8) ($1 + 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:34 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 9) ($1 + 1) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:35 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 4) ($1 + 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:36 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 3) ($1 + 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:37 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 2) ($1 + 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:38 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 1) ($1 + 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:39 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 0) ($1 + 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:40 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 1) ($1 + 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:41 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 2) ($1 + 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:42 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 3) ($1 + 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:43 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 4) ($1 + 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:44 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 5) ($1 + 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:45 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 6) ($1 + 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:46 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 7) ($1 + 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:47 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 8) ($1 + 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:48 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 9) ($1 + 2) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:49 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 4) ($1 + 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:50 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 3) ($1 + 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:51 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 2) ($1 + 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:52 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 1) ($1 + 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:53 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 0) ($1 + 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:54 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 1) ($1 + 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:55 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 2) ($1 + 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:56 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 3) ($1 + 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:57 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 4) ($1 + 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:58 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 5) ($1 + 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:59 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 6) ($1 + 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:60 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 7) ($1 + 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:61 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 8) ($1 + 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:62 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 9) ($1 + 3) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:63 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 4) ($1 + 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:64 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 3) ($1 + 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:65 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 2) ($1 + 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:66 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 1) ($1 + 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:67 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 - 0) ($1 + 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:68 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 1) ($1 + 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:69 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 2) ($1 + 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:70 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 3) ($1 + 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:71 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 4) ($1 + 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:72 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 5) ($1 + 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:73 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 6) ($1 + 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:74 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 7) ($1 + 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:75 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 8) ($1 + 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:76 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 9) ($1 + 4) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:77 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 1) ($1 + 5) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:78 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 2) ($1 + 5) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:79 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 3) ($1 + 5) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:80 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 4) ($1 + 5) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:81 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 1) ($1 + 6) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:82 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 2) ($1 + 6) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:83 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 3) ($1 + 6) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:84 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 4) ($1 + 6) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:85 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 1) ($1 + 7) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:86 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 2) ($1 + 7) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:87 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 3) ($1 + 7) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:88 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 4) ($1 + 7) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:89 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 1) ($1 + 8) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:90 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 2) ($1 + 8) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:91 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 3) ($1 + 8) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:92 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 4) ($1 + 8) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:93 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 1) ($1 + 9) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:94 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 2) ($1 + 9) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:95 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 3) ($1 + 9) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (DestroyedPixel:96 == 0) <DRAW ELEMENT:EnnemyBodyLVL1 FILLEDCIRCLE ($0 + 4) ($1 + 9) 0 ELEMENT:Clear>
ON NEWDrawEnnemy IF (EnnemyX_LVL1 == 0) <SET EnnemyX_LVL1 $0>
ON NEWDrawEnnemy IF (EnnemyY_LVL1 == 0) <SET EnnemyY_LVL1 $1>
ON NEWDrawEnnemy IF (EnnemyLVL1Alive == 0) <SET EnnemyLVL1Alive 1>
REMOVETRIGGER CountPixel
ON CountPixel SET PixelLeft 0
ON CountPixel IF (DestroyedPixel:1 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:2 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:3 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:4 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:5 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:6 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:7 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:8 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:9 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:10 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:11 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:12 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:13 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:14 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:15 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:16 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:17 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:18 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:19 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:20 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:21 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:22 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:23 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:24 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:25 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:26 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:27 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:28 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:29 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:30 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:31 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:32 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:33 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:34 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:35 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:36 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:37 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:38 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:39 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:40 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:41 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:42 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:43 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:44 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:45 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:46 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:47 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:48 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:49 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:50 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:51 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:52 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:53 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:54 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:55 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:56 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:57 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:58 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:59 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:60 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:61 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:62 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:63 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:64 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:65 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:66 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:67 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:68 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:69 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:70 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:71 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:72 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:73 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:74 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:75 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:76 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:77 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:78 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:79 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:80 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:81 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:82 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:83 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:84 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:85 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:86 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:87 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:88 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:89 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:90 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:91 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:92 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:93 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:94 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:95 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel IF (DestroyedPixel:96 == 0) <SET PixelLeft (PixelLeft + 1)>
ON CountPixel SET E.Health ((PixelLeft * 100) / 96)
ON CountPixel IF (E.Health <= 25) <SET EnnemyLVL1Alive 0>
ON CountPixel IF (E.Health <= 25) <TIMER 30 FRAMES FREEZEENNEMY_LVL1>
ON CountPixel IF (E.Health <= 25) <TIMER 30 FRAMES RESETLVL1ENNEMY>
REMOVETRIGGER RedrawEnnemy
ON RedrawEnnemy EXEC CheckDestroyed EnnemyX_LVL1 EnnemyY_LVL1
ON RedrawEnnemy EXEC NEWDrawEnnemy NewEnnemyX_LVL1 NewEnnemyY_LVL1
ON RedrawEnnemy SET EnnemyX_LVL1 NewEnnemyX_LVL1
ON RedrawEnnemy SET EnnemyY_LVL1 NewEnnemyY_LVL1
REMOVETRIGGER debugmenu
ON debugmenu EXEC CountPixel
ON debugmenu STATUS CLEAR
ON debugmenu STATUS ADDTEXT "FPS: "
ON debugmenu STATUS ADDNUMBER FPS
ON debugmenu STATUS ADDTEXT " Ennemy Health:"
ON debugmenu STATUS ADDNUMBER E.Health
ON debugmenu STATUS ADDTEXT "%"
ON debugmenu TIMER 1 FRAMES debugmenu
REMOVETRIGGER KEY_b
ON KEY_b DRAW ELEMENT:Earth RECT (210 - 100) (210 - 100) 200 200
ON KEY_b DRAW ELEMENT:Earth RECT (210 - 101) (210 - 101) 202 202
ON KEY_b DRAW ELEMENT:Earth RECT (210 - 102) (210 - 102) 204 204
ON KEY_b DRAW ELEMENT:Earth RECT (210 - 103) (210 - 103) 206 206
ON KEY_b DRAW ELEMENT:Earth RECT (210 - 104) (210 - 104) 208 208
SET EnnemyLVL1Alive 0
SET EnnemyFrozen 0
SET statustype 1
SET MoveToX (1 RAND WIDTH)
SET MoveToY (1 RAND HEIGHT)
EXEC clearscreen
EXEC debugmenu
EXEC defaultstatus
EXEC RESETLVL1ENNEMY
EXEC KEY_b