home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / Cubed.dxr / 00005_GamePlay.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  10.0 KB  |  304 lines

  1. property pTimeLoop, pTimeLoop2, pTimeLoop3, pTimeLoop4, pTimeLoop5
  2. global gPlayerUpRight, gPlayerUpLeft, gPlayerDownRight, gPlayerDownLeft, gEnemy1UpRight, gEnemy1UpLeft, gEnemy1DownRight, gEnemy1DownLeft, gEnemy2UpRight, gEnemy2UpLeft, gEnemy2DownRight, gEnemy2DownLeft, gEnemy3UpRight, gEnemy3UpLeft, gEnemy3DownRight, gEnemy3DownLeft, gEnemy4UpRight, gEnemy4UpLeft, gEnemy4DownRight, gEnemy4DownLeft, gLevelTime, gJumpSpeed, gLevel, gPaused, gMoveBady, gMoveBady2, gMoveBady3, gMoveBady4, gCue, gCue2, gCue3, gCue4, pAnimBounce, pAnimBounce2, pAnimBounce3, pAnimBounce4, pAnimBounce5, pJump
  3.  
  4. on beginSprite
  5.   pJump = 0
  6.   pAnimBounce2 = 1
  7.   pAnimBounce = 1
  8.   pAnimBounce3 = 1
  9.   pAnimBounce4 = 1
  10.   pAnimBounce5 = 1
  11.   gCue = 0
  12.   gCue2 = 0
  13.   gCue3 = 0
  14.   gCue4 = 0
  15. end
  16.  
  17. on exitFrame me
  18.   if gPaused = 0 then
  19.     if gPlayerUpRight = 1 then
  20.       if (sprite(200).member.name = "Balltest_Animated01") or (pJump = 1) then
  21.         if pAnimBounce <= 12 then
  22.           pJump = 1
  23.           sprite(200).locH = sprite(200).locH + 3
  24.           sprite(200).locV = sprite(200).locV - 4
  25.           pAnimBounce = pAnimBounce + 1
  26.         else
  27.           if pAnimBounce > 12 then
  28.             sprite(200).locH = sprite(200).locH + 1
  29.             MoveHikerUpRight()
  30.             EnemyCollision()
  31.             Enemy2Collision()
  32.             Enemy3Collision()
  33.             Enemy4Collision()
  34.             flipBlock()
  35.             checkLevelComplete()
  36.             pAnimBounce = 1
  37.             pJump = 0
  38.             gPlayerUpRight = 0
  39.           end if
  40.         end if
  41.       end if
  42.     else
  43.       if gPlayerUpLeft = 1 then
  44.         if (sprite(200).member.name = "Balltest_Animated01") or (pJump = 1) then
  45.           if pAnimBounce <= 12 then
  46.             pJump = 1
  47.             sprite(200).locH = sprite(200).locH - 3
  48.             sprite(200).locV = sprite(200).locV - 4
  49.             pAnimBounce = pAnimBounce + 1
  50.           else
  51.             if pAnimBounce > 12 then
  52.               sprite(200).locH = sprite(200).locH - 1
  53.               MoveHikerUpLeft()
  54.               EnemyCollision()
  55.               Enemy2Collision()
  56.               Enemy3Collision()
  57.               Enemy4Collision()
  58.               flipBlock()
  59.               checkLevelComplete()
  60.               pAnimBounce = 1
  61.               pJump = 0
  62.               gPlayerUpLeft = 0
  63.             end if
  64.           end if
  65.         end if
  66.       else
  67.         if gPlayerDownRight = 1 then
  68.           if (sprite(200).member.name = "Balltest_Animated01") or (pJump = 1) then
  69.             if pAnimBounce <= 12 then
  70.               pJump = 1
  71.               sprite(200).locH = sprite(200).locH + 3
  72.               sprite(200).locV = sprite(200).locV + 4
  73.               pAnimBounce = pAnimBounce + 1
  74.             else
  75.               if pAnimBounce > 12 then
  76.                 sprite(200).locH = sprite(200).locH + 1
  77.                 MoveHikerDownRight()
  78.                 EnemyCollision()
  79.                 Enemy2Collision()
  80.                 Enemy3Collision()
  81.                 Enemy4Collision()
  82.                 flipBlock()
  83.                 checkLevelComplete()
  84.                 pAnimBounce = 1
  85.                 pJump = 0
  86.                 gPlayerDownRight = 0
  87.               end if
  88.             end if
  89.           end if
  90.         else
  91.           if gPlayerDownLeft = 1 then
  92.             if (sprite(200).member.name = "Balltest_Animated01") or (pJump = 1) then
  93.               if pAnimBounce <= 12 then
  94.                 pJump = 1
  95.                 sprite(200).locH = sprite(200).locH - 3
  96.                 sprite(200).locV = sprite(200).locV + 4
  97.                 pAnimBounce = pAnimBounce + 1
  98.               else
  99.                 if pAnimBounce > 12 then
  100.                   sprite(200).locH = sprite(200).locH - 1
  101.                   MoveHikerDownLeft()
  102.                   EnemyCollision()
  103.                   Enemy2Collision()
  104.                   Enemy3Collision()
  105.                   Enemy4Collision()
  106.                   flipBlock()
  107.                   checkLevelComplete()
  108.                   pAnimBounce = 1
  109.                   pJump = 0
  110.                   gPlayerDownLeft = 0
  111.                 end if
  112.               end if
  113.             end if
  114.           end if
  115.         end if
  116.       end if
  117.     end if
  118.   end if
  119.   if gPaused = 0 then
  120.     if gEnemy1UpRight = 1 then
  121.       if (sprite(205).member.name = "Balltest2_Animated01") or (gCue = 1) then
  122.         gCue = 1
  123.         if pAnimBounce2 <= 12 then
  124.           sprite(205).locH = sprite(205).locH + 3
  125.           sprite(205).locV = sprite(205).locV - 4
  126.           pAnimBounce2 = pAnimBounce2 + 1
  127.         else
  128.           if pAnimBounce2 > 12 then
  129.             sprite(205).locH = sprite(205).locH + 1
  130.             MoveEnemyUpRight()
  131.             enemy1FlipBlock()
  132.             gMoveBady = 0
  133.             gEnemy1UpRight = 0
  134.             checkLevelComplete()
  135.             pAnimBounce2 = 1
  136.             gCue = 0
  137.           end if
  138.         end if
  139.       end if
  140.     else
  141.       if gEnemy1UpLeft = 1 then
  142.         if (sprite(205).member.name = "Balltest2_Animated01") or (gCue = 1) then
  143.           gCue = 1
  144.           if pAnimBounce2 <= 12 then
  145.             sprite(205).locH = sprite(205).locH - 3
  146.             sprite(205).locV = sprite(205).locV - 4
  147.             pAnimBounce2 = pAnimBounce2 + 1
  148.           else
  149.             if pAnimBounce2 > 12 then
  150.               sprite(205).locH = sprite(205).locH - 1
  151.               MoveEnemyUpLeft()
  152.               enemy1FlipBlock()
  153.               gMoveBady = 0
  154.               gEnemy1UpLeft = 0
  155.               checkLevelComplete()
  156.               pAnimBounce2 = 1
  157.               gCue = 0
  158.             end if
  159.           end if
  160.         end if
  161.       else
  162.         if gEnemy1DownRight = 1 then
  163.           if (sprite(205).member.name = "Balltest2_Animated01") or (gCue = 1) then
  164.             gCue = 1
  165.             if pAnimBounce2 <= 12 then
  166.               sprite(205).locH = sprite(205).locH + 3
  167.               sprite(205).locV = sprite(205).locV + 4
  168.               pAnimBounce2 = pAnimBounce2 + 1
  169.             else
  170.               if pAnimBounce2 > 12 then
  171.                 sprite(205).locH = sprite(205).locH + 1
  172.                 MoveEnemyDownRight()
  173.                 enemy1FlipBlock()
  174.                 gMoveBady = 0
  175.                 gEnemy1DownRight = 0
  176.                 checkLevelComplete()
  177.                 pAnimBounce2 = 1
  178.                 gCue = 0
  179.               end if
  180.             end if
  181.           end if
  182.         else
  183.           if gEnemy1DownLeft = 1 then
  184.             if (sprite(205).member.name = "Balltest2_Animated01") or (gCue = 1) then
  185.               gCue = 1
  186.               if pAnimBounce2 <= 12 then
  187.                 sprite(205).locH = sprite(205).locH - 3
  188.                 sprite(205).locV = sprite(205).locV + 4
  189.                 pAnimBounce2 = pAnimBounce2 + 1
  190.               else
  191.                 if pAnimBounce2 > 12 then
  192.                   sprite(205).locH = sprite(205).locH - 1
  193.                   MoveEnemyDownLeft()
  194.                   enemy1FlipBlock()
  195.                   gMoveBady = 0
  196.                   gEnemy1DownLeft = 0
  197.                   checkLevelComplete()
  198.                   gCue = 0
  199.                   pAnimBounce2 = 1
  200.                 end if
  201.               end if
  202.             end if
  203.           end if
  204.         end if
  205.       end if
  206.     end if
  207.   end if
  208.   if gPaused = 0 then
  209.     if gEnemy2UpRight = 1 then
  210.       if (sprite(206).member.name = "Balltest2_Animated01") or (gCue2 = 1) then
  211.         gCue2 = 1
  212.         if pAnimBounce3 <= 12 then
  213.           sprite(206).locH = sprite(206).locH + 3
  214.           sprite(206).locV = sprite(206).locV - 4
  215.           pAnimBounce3 = pAnimBounce3 + 1
  216.         else
  217.           if pAnimBounce3 > 12 then
  218.             sprite(206).locH = sprite(206).locH + 1
  219.             MoveEnemy2UpRight()
  220.             enemy2FlipBlock()
  221.             gMoveBady2 = 0
  222.             gEnemy2UpRight = 0
  223.             checkLevelComplete()
  224.             pAnimBounce3 = 1
  225.             gCue2 = 0
  226.           end if
  227.         end if
  228.       end if
  229.     else
  230.       if gEnemy2UpLeft = 1 then
  231.         if (sprite(206).member.name = "Balltest2_Animated01") or (gCue2 = 1) then
  232.           gCue2 = 1
  233.           if pAnimBounce3 <= 12 then
  234.             sprite(206).locH = sprite(206).locH - 3
  235.             sprite(206).locV = sprite(206).locV - 4
  236.             pAnimBounce3 = pAnimBounce3 + 1
  237.           else
  238.             if pAnimBounce3 > 12 then
  239.               sprite(206).locH = sprite(206).locH - 1
  240.               MoveEnemy2UpLeft()
  241.               enemy2FlipBlock()
  242.               gMoveBady2 = 0
  243.               gEnemy2UpLeft = 0
  244.               checkLevelComplete()
  245.               pAnimBounce3 = 1
  246.               gCue2 = 0
  247.             end if
  248.           end if
  249.         end if
  250.       else
  251.         if gEnemy2DownRight = 1 then
  252.           if (sprite(206).member.name = "Balltest2_Animated01") or (gCue2 = 1) then
  253.             gCue2 = 1
  254.             if pAnimBounce3 <= 12 then
  255.               sprite(206).locH = sprite(206).locH + 3
  256.               sprite(206).locV = sprite(206).locV + 4
  257.               pAnimBounce3 = pAnimBounce3 + 1
  258.             else
  259.               if pAnimBounce3 > 12 then
  260.                 sprite(206).locH = sprite(206).locH + 1
  261.                 MoveEnemy2DownRight()
  262.                 enemy2FlipBlock()
  263.                 gMoveBady2 = 0
  264.                 gEnemy2DownRight = 0
  265.                 checkLevelComplete()
  266.                 pAnimBounce3 = 1
  267.                 gCue2 = 0
  268.               end if
  269.             end if
  270.           end if
  271.         else
  272.           if gEnemy2DownLeft = 1 then
  273.             if (sprite(206).member.name = "Balltest2_Animated01") or (gCue2 = 1) then
  274.               gCue2 = 1
  275.               if pAnimBounce3 <= 12 then
  276.                 sprite(206).locH = sprite(206).locH - 3
  277.                 sprite(206).locV = sprite(206).locV + 4
  278.                 pAnimBounce3 = pAnimBounce3 + 1
  279.               else
  280.                 if pAnimBounce3 > 12 then
  281.                   sprite(206).locH = sprite(206).locH - 1
  282.                   MoveEnemy2DownLeft()
  283.                   enemy2FlipBlock()
  284.                   gMoveBady2 = 0
  285.                   gEnemy2DownLeft = 0
  286.                   checkLevelComplete()
  287.                   pAnimBounce3 = 1
  288.                   gCue2 = 0
  289.                 end if
  290.               end if
  291.             end if
  292.           end if
  293.         end if
  294.       end if
  295.     end if
  296.     AnimatePlayer()
  297.     AnimateEnemy1()
  298.     AnimateEnemy2()
  299.     ShowTime()
  300.     moveStarField()
  301.   end if
  302.   go(the frame)
  303. end
  304.