home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magazin 1995 May / TYPEMANIA.ISO / demo_s.dir / 00449_Script_449 < prev    next >
Text File  |  1994-02-24  |  3KB  |  135 lines

  1.  
  2.  
  3.  
  4.  
  5. on verteile
  6.   global gDoDarker, gUndNunSchluss, gUserNotActive, gPaletteCount
  7.   
  8.   if gUndNunSchluss then
  9.     go to "Exit"
  10.   else
  11.     if gDoDarker then
  12.       DoDarker
  13.     else
  14.       put random(20) into x
  15.       if x=1 then play "down"
  16.       if x=2 then play "up"
  17.       if x=3 then play "left"
  18.       if x=4 then play "right"
  19.       if x=5 then play "fuss"
  20.       if x=6 then
  21.         puppetPalette "colors" & string(gPaletteCount/2),60
  22.         play "uhr"
  23.       end if
  24.       if x=7 then play "Vogel"
  25.       if x=8 then 
  26.         puppetPalette "colors" & string(gPaletteCount/2),60
  27.         play "Windheftig"
  28.       end if
  29.       if x=9 then
  30.         play "fuss"
  31.         if not soundbusy(1) then
  32.           puppetsound "XZwitschern"
  33.         end if
  34.       end if
  35.       if x=10 then play "Flieger"
  36.       if x>10 then play "fuss"
  37.     end if
  38.   end if -- Schlu▀
  39. end verteile
  40.  
  41.  
  42. on startMovie
  43.   global gStartTicks,gPaletteCount,gDoEnde
  44.   global gDoDarker, gUndNunSchluss
  45.   
  46.   cursor 4
  47.   put FALSE into gDoDarker
  48.   put FALSE into gDoEnde
  49.   put FALSE into gUndNunSchluss -- endgⁿltig Ende
  50.   set the mousedownscript to "BackToTheRoot"
  51.   set gPaletteCount=0
  52.   put the Ticks into gStartTicks
  53. end startMovie
  54.  
  55. on BackToTheRoot
  56.   if the optiondown then
  57.     sound close 1
  58.     sound close 2
  59.     play done
  60.   end if
  61.   
  62.   
  63. end BackToTheRoot
  64.  
  65. on stopMovie
  66.   puppetSound 0
  67.   puppetPalette 0 
  68.   allNoPuppets
  69.   cursor 0
  70.   cursor 4
  71. end stopMovie
  72.  
  73. on idle
  74.   global gStartTicks,gDoDarker,gDoEnde,gUndNunSchluss,gPaletteCount
  75.   if gDoEnde then -- das letzte Mal etwas lΣnger
  76.     if the Ticks - gStartTicks > 480 then -- 8 secs
  77.       put TRUE into gUndNunSchluss
  78.     end if
  79.   else
  80.     if the Ticks - gStartTicks > 600 then --10 secs
  81.       put the Ticks into gStartTicks
  82.       put TRUE into gDoDarker
  83.     end if
  84.   end if
  85. end idle
  86.  
  87.  
  88. on DoDarker
  89.   global gPaletteCount, gDoDarker, gDoEnde
  90.   put FALSE into gDoDarker
  91.   put gPaletteCount+1 into gPaletteCount -- next Background
  92.   put String(gPaletteCount) into Nstr
  93.   puppetSprite 1,1 -- Background
  94.   
  95.   if gPaletteCount<4 then
  96.     set the castNum of sprite 1 to the number of cast ( "BG" && Nstr)
  97.     puppetPalette "colors" & String(gPaletteCount/2),60
  98.     updateStage
  99.   end if
  100.   
  101.   if gPaletteCount > 3 then
  102.     put TRUE into gDoEnde -- 29 Backgrounds
  103.   end if
  104. end DoDarker
  105.  
  106. on keyDown
  107.   global gUndNunSchluss
  108.   if the key = " " then
  109.     puppetSound "xCmdPunkt" 
  110.     put TRUE into gUndNunSchluss
  111.     cursor 4
  112.   end if
  113. end keyDaun
  114.  
  115. on SetQTUhr
  116.   put offset(":",the abbr time) into DP
  117.   if DP=0 then put offset(".",the abbr time) into DP  -- German
  118.   if DP>0 then
  119.     put value(char 1 to DP-1 of the abbr time) into H
  120.     put value(char DP+1 to DP+2 of the abbr time) into M
  121.     if H>11 then set H=H-12
  122.     set H=(H*60+M)
  123.   else
  124.     Set H=random(720)
  125.   end if
  126.   set the castNum of sprite 25 to 479+H
  127.   UpdateStage
  128. end SetQTUhr
  129.  
  130. on allNoPuppets
  131.   repeat with i = 1 to 24
  132.     puppetSprite i, FALSE
  133.   end repeat
  134. end allNoPuppets
  135.