home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magazin 1995 May / TYPEMANIA.ISO / demo_t.dir / 00043_Script_43 < prev    next >
Text File  |  1994-02-24  |  6KB  |  231 lines

  1. on startMovie
  2.   global gxR, gyR, gxO, gyO, gxT, gyT,gSpeed,gxA, gyA,gEnde
  3.  
  4.  
  5.   set gSpeed=12
  6.   set gxA = Richtungswert()
  7.   set gyA = Richtungswert()
  8.   if gyA > 0 then set gyA=-gyA
  9.   if gyA >-5 then set gyA=2*gyA
  10.   set gSpeed=4
  11.   set gxR = Richtungswert()
  12.   set gyR = Richtungswert()
  13.   set gxO = Richtungswert()
  14.   set gyO = Richtungswert()
  15.   set gxT = Richtungswert()
  16.   set gyT = Richtungswert()
  17.   set gEnde=FALSE
  18.   startTimer
  19.   set the timeOutLength to 3600 -- 1 minute
  20.   set the timeOutScript to "EndTimeScript"
  21.   set the exitLock to false
  22.   sound stop 2
  23.   set the mousedownscript to "BackToTheRoot" 
  24. end startmovie
  25.  
  26. on BackToTheRoot
  27.   if the optiondown then
  28.     sound close 1
  29.     sound close 2
  30.     play done
  31.   end if
  32. end BackToTheRoot
  33.  
  34.  
  35. on EndTimeScript
  36.   global gEnde
  37.   set gEnde=TRUE
  38.   set the timeOutScript to ""
  39. end
  40.  
  41. on stopMovie
  42.   cursor 4
  43.   repeat with i=2 to 14
  44.     puppetSprite i, false
  45.   end repeat
  46.   set the mouseDownScript to empty
  47.   set the cursor of sprite 48 to 0
  48. end stopMovie
  49.  
  50. on idle
  51.   global gxR, gyR, gxO, gyO, gxT, gyT, 
  52.   BewegeA
  53.   --òòò R und BOX òòò
  54.   if gxR/abs(gxR)>0 then
  55.     if sprite 11 intersects 10 then
  56.       set the locH of sprite 11 to the locH of sprite 11 -gxR/abs(gxR)
  57.       set gxR = Richtungswert()
  58.     else
  59.       set the locH of sprite 11 to the locH of sprite 11 +gxR
  60.     end if
  61.   else
  62.     if sprite 11 intersects 7 then
  63.       set the locH of sprite 11 to the locH of sprite 11 -gxR/abs(gxR)
  64.       set gxR = Richtungswert()
  65.     else
  66.       set the locH of sprite 11 to the locH of sprite 11 +gxR
  67.     end if
  68.   end if
  69.   if gyR/abs(gyR)>0 then
  70.     if sprite 11 intersects 8 then
  71.       set the locV of sprite 11 to the locV of sprite 11 -gyR/abs(gyR)
  72.       set gyR = Richtungswert()
  73.     else
  74.       set the locV of sprite 11 to the locV of sprite 11 +gyR
  75.     end if
  76.   else
  77.     if sprite 11 intersects 9 then
  78.       set the locV of sprite 11 to the locV of sprite 11 -gyR/abs(gyR)
  79.       set gyR = Richtungswert()
  80.     else
  81.       set the locV of sprite 11 to the locV of sprite 11 +gyR
  82.     end if
  83.   end if
  84.   --òòò O und BOX òòò
  85.   if gxO/abs(gxO)>0 then
  86.     if sprite 12 intersects 10 then
  87.       set the locH of sprite 12 to the locH of sprite 12 -gxO/abs(gxO)
  88.       set gxO = Richtungswert()
  89.     else
  90.       set the locH of sprite 12 to the locH of sprite 12 +gxO
  91.     end if
  92.   else
  93.     if sprite 12 intersects 7 then
  94.       set the locH of sprite 12 to the locH of sprite 12 -gxO/abs(gxO)
  95.       set gxO = Richtungswert()
  96.     else
  97.       set the locH of sprite 12 to the locH of sprite 12 +gxO
  98.     end if
  99.   end if
  100.   if gyO/abs(gyO)>0 then
  101.     if sprite 12 intersects 8 then
  102.       set the locV of sprite 12 to the locV of sprite 12 -gyO/abs(gyO)
  103.       set gyO = Richtungswert()
  104.     else
  105.       set the locV of sprite 12 to the locV of sprite 12 +gyO
  106.     end if
  107.   else
  108.     if sprite 12 intersects 9 then
  109.       set the locV of sprite 12 to the locV of sprite 12 -gyO/abs(gyO)
  110.       set gyO = Richtungswert()
  111.     else
  112.       set the locV of sprite 12 to the locV of sprite 12 +gyO
  113.     end if
  114.   end if
  115.   --òòò T und BOX òòò
  116.   if gxT/abs(gxT)>0 then
  117.     if sprite 13 intersects 10 then
  118.       set the locH of sprite 13 to the locH of sprite 13 -gxT/abs(gxT)
  119.       set gxT = Richtungswert()
  120.     else
  121.       set the locH of sprite 13 to the locH of sprite 13 +gxT
  122.     end if
  123.   else
  124.     if sprite 13 intersects 7 then
  125.       set the locH of sprite 13 to the locH of sprite 13 -gxT/abs(gxT)
  126.       set gxT = Richtungswert()
  127.     else
  128.       set the locH of sprite 13 to the locH of sprite 13 +gxT
  129.     end if
  130.   end if
  131.   if gyT/abs(gyT)>0 then
  132.     if sprite 13 intersects 8 then
  133.       set the locV of sprite 13 to the locV of sprite 13 -gyT/abs(gyT)
  134.       set gyT = Richtungswert()
  135.     else
  136.       set the locV of sprite 13 to the locV of sprite 13 +gyT
  137.     end if
  138.   else
  139.     if sprite 13 intersects 9 then
  140.       set the locV of sprite 13 to the locV of sprite 13 -gyT/abs(gyT)
  141.       set gyT = Richtungswert()
  142.     else
  143.       set the locV of sprite 13 to the locV of sprite 13 +gyT
  144.     end if
  145.   end if
  146.   updateStage
  147. end idle
  148.  
  149. on Richtungswert
  150.   global gSpeed
  151.   if random(2)=1 then
  152.     return random(gSpeed)
  153.   else
  154.     return -random(gSpeed)
  155.   end if
  156. end Richtungswert
  157.  
  158.  
  159. on BewegeA
  160.   global gxA,gyA,gEnde
  161.   put the locH of sprite 14 into LH
  162.   put the locV of sprite 14 into LV
  163.   set LxA=gxA
  164.   set LyA=gyA
  165.   if (LH<32) OR (LH>480) then
  166.     if LH<32 then
  167.       set gxA= abs(gxA)
  168.       set LxA=gxA
  169.     else
  170.       set gxA= -abs(gxA)
  171.       set LxA=gxA
  172.     end if
  173.     if gEnde AND (LH<32) then
  174.       set the stageColor to random(249)
  175.       if the timer > 720 then
  176.         go to "exit"
  177.       end if
  178.       set gxA=-gxA
  179.       set LxA=gxA
  180.     end if
  181.   else
  182.     if sprite 14 intersects 7 then
  183.       -- links angeknallt
  184.       set gxA=-gxA
  185.       set LxA=gxA*4
  186.       --if the timer >1 then
  187.       set the locH of sprite 7 to (the locH of sprite 7)+40 
  188.       set the locH of sprite 9 to (the locH of sprite 9)+40
  189.       --  startTimer
  190.       if the locH of sprite 7 > 500 then
  191.         set gEnde = TRUE
  192.         startTimer
  193.       end if
  194.       --  end if
  195.     end if
  196.     if sprite 14 intersects 9 then
  197.       -- oben angeknallt
  198.       set gyA=-gyA
  199.       set LyA=gyA*2
  200.       --   if the timer >1 then
  201.       set the locV of sprite 9 to (the locV of sprite 9)+40 
  202.       set the locV of sprite 7 to (the locV of sprite 7)+40
  203.       --  startTimer
  204.       if the locV of sprite 9 > 372 then
  205.         set gEnde = TRUE
  206.         startTimer
  207.       end if
  208.       --    end if
  209.     end if
  210.   end if
  211.   if (LV<32) OR (LV>352) then
  212.     if LV<32 then
  213.       set gyA=abs(gyA)
  214.       set gxA=gxA/abs(gxA)*random(12)
  215.       set LxA=gxA*2
  216.       set LyA=gyA*2
  217.     else
  218.       set gyA=-abs(gyA)
  219.       set gxA=gxA/abs(gxA)*random(12)
  220.       set LxA=gxA*2
  221.       set LyA=gyA*2
  222.     end if
  223.   end if
  224.   set the locH of sprite 14 to LH + LxA
  225.   set the locV of sprite 14 to LV + LyA
  226. end BewegeA
  227.  
  228.  
  229. on EndScript
  230.   go to "exit"
  231. end EndScript