home *** CD-ROM | disk | FTP | other *** search
/ LAUNCH 3 / LAUNCH.BIN / pc / sony / highdes.dir / 00001_Script_1 next >
Text File  |  1995-06-07  |  9KB  |  340 lines

  1. --high des start movie
  2.  
  3. on STARTMOVIE
  4.   global gCurrRolled,gDesScore,gHoldScore,gSndPath
  5.   global gQTSoundChannel, gKarmicSprite,gQTSoundVolume
  6.   --  set the traceLoad to 1
  7.   
  8.   
  9.   cursor 4
  10.   
  11.   CLEARGLOBALS   -------###delete me!!!!
  12.   
  13.   -- INTBUGFIX
  14.   
  15.   set gHoldScore = 0
  16.   set gDesScore = 0
  17.   set gCurrRolled = 0
  18.   
  19.   set gQTSoundVolume = 255
  20.   
  21.   initCLICKABLES
  22.   INITMOVIE
  23.   
  24.   set gQTSoundChannel = 44
  25.   puppetSprite gQTSoundChannel, TRUE
  26.   
  27.   put 22 into gKarmicSprite
  28.   
  29.   if the machineType = 256 then
  30.     set gSndPath to the pathname & "sounds\"  --PC
  31.   else
  32.     set gSndPath to the pathname & "sounds:"  --Macintosh
  33.   end if
  34.   
  35.   puppetsprite(30), true
  36.   set the castnum of sprite(30)=(the number of cast "Score 1")
  37.   
  38.   SHOWNEEDLE
  39.   
  40.   puppetsprite(46), true   --Scoring Needle on the gauge
  41.   
  42.   cursor 4
  43.   
  44. end
  45.  
  46.  
  47. --------------------------------------------------------------------
  48. --------------------------------------------------------------------
  49.  
  50. on CURSORENTERFRAME
  51.   global gCurrCursorSprite, gOrgCursorWidth, gOrgCursorHeight
  52.   global gPrevCursorH, gRightCursor, gCurrConstSprite
  53.   
  54.   put the mouseV into currMouseV
  55.   put the mouseH into currMouseH
  56.   
  57.   put (currMouseV - 100)/300.0000 into currPercent
  58.   if currPercent < .5 then put .5 into currPercent
  59.   if currPercent > 1 then put 1 into currPercent
  60.   
  61.   spriteBox gCurrCursorSprite, ¼
  62. currMouseH - (.666 * gOrgCursorWidth * currPercent), ¼
  63. constrainV(gCurrConstSprite, currMouseV) - (.333 * gOrgCursorHeight * currPercent), ¼
  64. (currMouseH - (.666 * gOrgCursorWidth * currPercent)) + (gOrgCursorWidth * currPercent), ¼
  65. (constrainV(gCurrConstSprite, currMouseV) - (.333 * (gOrgCursorHeight * currPercent))) + (gOrgCursorHeight * currPercent)
  66.   
  67.   if currMouseH - gPrevCursorH < -5 then
  68.     if the castNum of sprite gCurrCursorSprite = gRightCursor then 
  69.       set the castNum of sprite gCurrCursorSprite to gRightCursor + 1
  70.     else
  71.       nothing
  72.     end if
  73.   else if currMouseH - gPrevCursorH > 5 then
  74.     if the castNum of sprite gCurrCursorSprite = gRightCursor then 
  75.       nothing
  76.     else
  77.       set the castNum of sprite gCurrCursorSprite to gRightCursor
  78.     end if
  79.   end if
  80.   
  81.   put currMouseH into gPrevCursorH
  82. end
  83.  
  84.  
  85. --------------------------------------------------------------------
  86. --------------------------------------------------------------------
  87.  
  88. --checks rollovers and changes to appropriate sprite
  89.  
  90. on CHECKROLLOVER
  91.   global gCurrRolledSprite, gCurrCursorSprite
  92.   global gOverSprite, gUnderSprite, gCurrLayer
  93.   
  94.   repeat with x=6 to 14
  95.     
  96.     if sprite gCurrCursorSprite intersects x then --rollover the rectangular sprite area
  97.       
  98.       puppetsprite(x), true
  99.       set currCastnumber = integer(the castNum of sprite(x))
  100.       set gCurrRolledSprite = x
  101.       set CurCastName = the name of cast(currCastnumber)
  102.       
  103.       STOPPCSOUND  --STOPS THE THUNDER ON A PC SO ROLLOVER SOUND PLAYS
  104.       
  105.       go CurCastName
  106.       puppetsprite(x) false
  107.       exit
  108.     end if
  109.     
  110.   end repeat
  111.   
  112. end
  113.  
  114. --------------------------------------------------------------------
  115. --------------------------------------------------------------------
  116.  
  117. --clears rollover
  118.  
  119. on CLEARROLLOVER
  120.   global gCurrCursorSprite
  121.   
  122.   --  set the visible of sprite(5) = TRUE
  123.   
  124.   repeat with x=6 to 14
  125.     puppetsprite x, false
  126.   end repeat
  127.   
  128.   puppetsprite gCurrCursorSprite, FALSE
  129.   
  130.   
  131.   
  132.   cursor 0
  133.   
  134. end
  135.  
  136.  
  137. --------------------------------------------------------------------
  138. --------------------------------------------------------------------
  139.  
  140. --adjusts score needle
  141.  
  142. on MOVENEEDLE
  143.   global gDesScore,gHoldScore
  144.   
  145.   -- alert "score " & gDesScore
  146.   
  147.   set NeedleCast = "Score " & gDesScore
  148.   set the castnum of sprite(46) = the number of cast NeedleCast
  149.   updatestage
  150.   
  151. end
  152.  
  153.  
  154. --------------------------------------------------------------------
  155. --------------------------------------------------------------------
  156.  
  157. On CHECKDONETHAT whichClickable, goWhere
  158.   global gDesScore, gDoneThatList,gQTSoundChannel
  159.   
  160.   if not listp(gDoneThatList) then put [] into gDoneThatList
  161.   
  162.   --ò check if its already in list
  163.   if getOne(gDoneThatList, whichClickable) = 0 then
  164.     add gDoneThatList, whichClickable
  165.     HIDENEEDLE
  166.     cursor 4
  167.     go to goWhere
  168.     --unload 
  169.   else
  170.     MotoCursor
  171.     KillQTSound
  172.     PlayQTSound "BEENTHER.MOV"
  173.     put the duration of cast "BEENTHER.MOV" into X
  174.     repeat while the movietime of sprite(gQTSoundChannel) < X
  175.       CURSORENTERFRAME
  176.       updateStage
  177.     end repeat
  178.     
  179.     go to "hd main2"
  180.     sound stop 1
  181.   end if
  182. end
  183.  
  184.  
  185. --------------------------------------------------------------------
  186. --------------------------------------------------------------------
  187.  
  188.  
  189. On SCOREMINICLICK whichClickable, score, qtSound
  190.   global gDesScore, gDoneThatList
  191.   
  192.   if not listp(gDoneThatList) then put [] into gDoneThatList
  193.   
  194.   --ò check if its already in list
  195.   if getOne(gDoneThatList, whichClickable) = 0 then
  196.     add gDoneThatList, whichClickable
  197.     set gDesScore = gDesScore + score
  198.     MOVENEEDLE  --adjusts the score needle
  199.     PlayQTSound qtSound
  200.   end if
  201. end
  202.  
  203.  
  204. --------------------------------------------------------------------
  205. --------------------------------------------------------------------
  206.  
  207.  
  208. On SCOREMAJORCLICK score
  209.   global gDesScore, gDoneThatList
  210.   set gDesScore = gDesScore + score
  211.   MOVENEEDLE  --adjusts the score needle
  212. end
  213.  
  214.  
  215.  
  216. --------------------------------------------------------------------
  217. --------------------------------------------------------------------
  218.  
  219. --variable so user only gets points once for clicking on a
  220. --miniclickable or major clickable
  221.  
  222. on initCLICKABLES
  223.   global gMesa,gRadio,gSnake,gTeePee,gAlien
  224.   global gCow,gCactus,gLizardade,gPrairiedog
  225.   
  226.   --major clickable areas
  227.   set gMesa = 0
  228.   set gRadio = 0
  229.   set gSnake = 0
  230.   set gTeePee = 0
  231.   set gAlien = 0
  232.   
  233.   --miniClickables
  234.   set gCow = false
  235.   set gCactus = false
  236.   set gLizardade = false
  237.   set gPrairiedog = false
  238. end
  239.  
  240.  
  241.  
  242. --------------------------------------------------------------------
  243. --------------------------------------------------------------------
  244.  
  245. --inits motorcycle cursor
  246.  
  247. on MotoCursor
  248.   global gCurrCursorSprite
  249.   
  250.   puppetSprite gCurrCursorSprite, TRUE
  251.   cursor 200
  252. end
  253.  
  254.  
  255.  
  256. --------------------------------------------------------------------
  257. --------------------------------------------------------------------
  258.  
  259. on countTime seconds
  260.       startTimer
  261.       repeat while the timer < (60 * seconds)
  262.             nothing
  263.       end repeat
  264. end countTime
  265.  
  266.  
  267. --------------------------------------------------------------------
  268. --------------------------------------------------------------------
  269.  
  270. --button presses up then down
  271.  
  272. on BUTTONOFFSET
  273.   set the locV of sprite(the clickon) to (the locV of sprite(the clickon) + 10)
  274.   set the locH of sprite(the clickon) to (the locH of sprite(the clickon) + 10)
  275.   updatestage
  276. end
  277.  
  278.  
  279. --------------------------------------------------------------------
  280. --------------------------------------------------------------------
  281.  
  282. --hides the scoring needle
  283.  
  284. on HIDENEEDLE
  285.   set the visible of sprite(46) = false
  286.   updatestage
  287. end
  288.  
  289.  
  290. --------------------------------------------------------------------
  291. --------------------------------------------------------------------
  292.  
  293. --show the scoring needle
  294.  
  295. on SHOWNEEDLE
  296.   set the visible of sprite(46) = true
  297.   updatestage
  298. end
  299.  
  300.  
  301. --------------------------------------------------------------------
  302. --------------------------------------------------------------------
  303.  
  304. --Checks if machine is a PC, if so then stops sound of thunder
  305. --so rollover sounds can play
  306.  
  307. on STOPPCSOUND
  308.   if the machineType = 256 then
  309.     if soundBusy(1) then sound stop (1)
  310.   end if
  311. end
  312.  
  313.  
  314. --------------------------------------------------------------------
  315. --------------------------------------------------------------------
  316.  
  317. --sets and resets the pointer cursor when user rolls over a button
  318.  
  319. on SETPOINTER firstSprite,lastSprite
  320.   set Z = the number of cast "PointerCursor"
  321.   set ZZ = the number of cast "PointerCursor" + 1
  322.   repeat with x = firstSprite to lastSprite
  323.     set the cursor of sprite(x) to [Z,ZZ]
  324.   end repeat
  325.   
  326.   --exit and main menu button
  327.   repeat with x = 40 to 41
  328.     set the cursor of sprite(x) to [Z,ZZ]
  329.   end repeat
  330. end
  331.  
  332. on UNSETPOINTER firstSprite,lastSprite
  333.   repeat with x = firstSprite to lastSprite
  334.     set the cursor of sprite(x) to 0
  335.   end repeat
  336.   --exit and main menu button
  337.   repeat with x = 40 to 41
  338.     set the cursor of sprite(x) to 0
  339.   end repeat
  340. end