home *** CD-ROM | disk | FTP | other *** search
/ Venus' Playhouse / Venus_Playhouse.iso / mac / PCPLHAUS.DXR / 00180_Script_180 < prev    next >
Text File  |  1998-03-29  |  11KB  |  500 lines

  1. global qtSprite, qtSpeed, qtVol
  2. global Destin
  3. global haveBeen
  4. global questLine, yesIn, yesOut, noIn, noOut, questOut
  5.  
  6.  
  7. --The MAIN MOVIE Script
  8. on StartMovie
  9.   clearGlobals 
  10.   global qtSprite -----,increment, L
  11.   set qtSprite = 11
  12.   set the immediate of sprite 8 to TRUE
  13.   --puppetSprite 4, TRUE
  14.   set the constraint of sprite 18 to 19
  15. end StartMovie
  16.  
  17. on stopMovie
  18.   clearGlobals
  19. end stopMovie
  20.  
  21. on stepmovie
  22.   if (sprite 18 intersects 24) then
  23.     set the soundlevel to 7
  24.   else if (sprite 18 intersects 23) then
  25.     set the soundlevel to 6
  26.   else if (sprite 18 intersects 22) then
  27.     set the soundlevel to 5
  28.   else if (sprite 18 intersects 21) then
  29.     set the soundlevel to 3    
  30.   else if (sprite 18 intersects 20) then
  31.     set the soundlevel to 0
  32.   else
  33.     set the soundlevel to 7
  34.   end if
  35. end stepmovie
  36.  
  37.  
  38. ---
  39. ---QT parameter set scripts
  40.  
  41.  
  42. on setPoints inTime, outTime
  43.   set the startTime of sprite qtSprite to value(inTime)
  44.   set the stopTime of sprite qtSprite to value(outTime)
  45.   set the movieTime of sprite qtSprite to value(inTime)
  46.   updateStage
  47. end setPoints
  48.  
  49. on playSeg inTime,outTime
  50.   set the startTime of sprite qtSprite to value(inTime)
  51.   set the stopTime of sprite qtSprite to value(outTime)
  52.   set the movieTime of sprite qtSprite to value(inTime)
  53.   set qtVol = 255
  54.   set qtSpeed = 1
  55.   playSome
  56. end playSeg
  57.  
  58. on playSegment inTime, outTime
  59.   set the movieTime of sprite qtSprite to value(inTime)
  60.   repeat while the movieTime of sprite qtSprite < value(outTime)
  61.     go to the frame
  62.     updateStage
  63.   end repeat
  64. end playSegment
  65.  
  66.  
  67. on ranger
  68.   set the movieRate of sprite qtSprite = value(qtSpeed)
  69.   set qtVol = 255
  70.   go to the frame
  71. end ranger
  72.  
  73. on playSome
  74.   set the movieRate of sprite qtSprite to value(qtSpeed)
  75.   set the volume of sprite qtSprite to value(qtVol)
  76. end playSome
  77.  
  78.  
  79.  
  80. ---
  81. ---Navigational scripts
  82.  
  83. on goWhere
  84.   go Destin
  85. end gowhere
  86.  
  87. on kitchenIt
  88.   set haveBeen = haveBeen + 1
  89.   aniRoom 10
  90.   Go to "Kitchen"
  91. end kitchenIt
  92.  
  93. on dineIt
  94.   updateStage
  95.   aniRoom 9
  96.   Go to "Dine"
  97. end dineIt
  98.  
  99. on poolIt
  100.   set haveBeen = haveBeen + 1
  101.   aniRoom 10
  102.   Go to "Pool"
  103. end poolIt
  104.  
  105. on bathIt
  106.   set haveBeen = haveBeen + 1
  107.   aniRoom 9
  108.   Go to "Bath"
  109. end bathIt
  110.  
  111. on showerIt
  112.   set haveBeen = haveBeen + 1
  113.   aniRoom 10
  114.   Go to "Shwr"
  115. end showerIt
  116.  
  117. on bedIt
  118.   global haveBeen
  119.   set haveBeen = haveBeen + 1
  120.   aniRoom 8
  121.   Go to "Bed"
  122. end bedIt
  123.  
  124.  
  125. ---
  126. ---Prepatory scripts
  127.  
  128.  
  129. on setUp
  130.   repeat with i = 8 to 10
  131.     puppetSprite i, TRUE
  132.     set the visibility of sprite i to FALSE
  133.     updateStage
  134.   end repeat
  135. end setUp
  136.  
  137. on aniRoom spRt
  138.   anIt
  139.   puppetSound "Clicker4"
  140.   set the visibility of sprite spRt to TRUE
  141.   updateStage
  142.   delay 360
  143.   unanIt
  144.   delay 360
  145.   set the visibility of sprite spRt to FALSE
  146.   updateStage
  147. end aniRoom
  148.  
  149. on playIntro
  150.   set haveBeen = 0
  151.   set the startTime of sprite qtSprite to 6
  152.   set the stopTime of sprite qtSprite to 1314
  153.   set the movieTime of sprite qtSprite to 6
  154.   set the volume of sprite qtSprite to 255
  155.   set the movieRate of sprite qtSprite to 1
  156. end
  157.  
  158. on intro inTime,outTime
  159.   set the startTime of sprite qtSprite to value(inTime)
  160.   set the stopTime of sprite qtSprite to value(outTime)
  161.   set the movieTime of sprite qtSprite to value(inTime)
  162.   set the volume of sprite qtSprite to 255
  163.   set the movieRate of sprite qtSprite to 1
  164. end intro
  165.  
  166.  
  167. ---on poolIntro
  168. ---global PyesIn, PyesOut, PnoIn, PnoOut
  169. --- set PyesIn = 1731
  170. ---set PyesOut = 4464
  171. ---set PnoIn = 11692
  172. ---set PnoOut = 12080
  173. ---playSegmentQT 1000, 1565
  174. ---nd poolIntro
  175.  
  176. ---on poolPlayYes
  177. ---global PyesIn, PyesOut
  178. ---playSegmentQT PyesIn, PyesOut
  179. ---pause
  180. ---end poolPlayYes
  181.  
  182. ---on poolPlayNo
  183. ---global PnoIn, PnoOut
  184. ---playSegmentQT PnoIn, PnoOut
  185. ---pause
  186. ---end poolPlayNo
  187.  
  188. ---
  189. ---Animation Scripts
  190.  
  191.  
  192. on anIt
  193.   put the castNum of sprite the clickOn into Butt
  194.   set newButt = Butt + 1
  195.   set the castNum of sprite the clickOn to newButt
  196.   delay 90
  197.   updateStage
  198.   set newButt = newButt + 1
  199.   set the castNum of sprite the clickOn to newButt
  200.   delay 90
  201.   updateStage
  202. end anIt
  203.  
  204. on unanIt
  205.   put the castNum of sprite the clickOn into Butt
  206.   set newButt = Butt - 1
  207.   set the castNum of sprite the clickOn to newButt
  208.   delay 90
  209.   updateStage
  210.   set newButt = newButt - 1
  211.   set the castNum of sprite the clickOn to newButt
  212.   delay 90
  213.   updateStage
  214. end unanIt
  215.  
  216.  
  217. on aniMate
  218.   anIt
  219.   puppetSound "Clicker4"
  220.   updateStage
  221.   delay 60
  222.   unanIt
  223.   delay 120
  224.   updateStage
  225. end aniMate
  226.  
  227.  
  228.  
  229.  
  230. ---
  231. ---Interactivity Choice Scripts
  232.  
  233. on pickVenus
  234.   aniMate
  235.   go to "Venus"
  236. end pickVenus
  237.  
  238. on pickJulia
  239.   aniMate
  240.   go to "Julia"
  241. end pickJulia
  242.  
  243. on pickBoth
  244.   aniMate
  245.   Go to "Bathboth"
  246. end pickBoth
  247.  
  248.  
  249. on pickLeigh
  250.   aniMate
  251.   Go to "Leigh"
  252. end pickLeigh
  253.  
  254. on pickVanna
  255.   aniMate
  256.   Go to "Vanna"
  257. end pickVanna
  258.  
  259. on pickShwrbth
  260.   aniMate
  261.   Go to "Shwrbth"
  262. end pickShwrbth
  263.  
  264.  
  265.  
  266. --QuickTime Controls
  267. --These controls the FF, SloF, Stop/Play, SloRew and Rewind
  268. --of QuickTime movies
  269.  
  270.  
  271. ----  DO NOT TAMPER!!!   These work fine!!!
  272.  
  273.  
  274. on rewindQT
  275.   put the movieTime of sprite qtSprite into Now
  276.   set the movieTime of sprite qtSprite = Value(Now) -18
  277.   updateStage
  278.   if the movieRate of sprite qtSprite <> -3 then
  279.     set qtVol = 0
  280.     set qtSpeed = -(3)
  281.     playSome
  282.   else
  283.     set qtSpeed = 0
  284.     playSome
  285.   end if
  286. end rewindQT
  287.  
  288. on sloRevQT
  289.   set the movieRate of sprite qtSprite =0
  290.   put the movieTime of sprite qtSprite into X
  291.   set X=X-6
  292.   set the movieTime of sprite qtSprite to X
  293.   updateStage
  294. end sloRevQT
  295.  
  296. on stopstartQT
  297.   if the movieRate of sprite qtSprite = 0 then
  298.     set the volume of sprite qtSprite to 255
  299.     set the movieRate of sprite qtSprite to 1
  300.   else
  301.     set qtSpeed = 0
  302.     playSome
  303.   end if
  304. end stopstartQT
  305.  
  306. on pauseQT
  307.   set qtSpeed = 0
  308.   playSome
  309. end pauseQT
  310.  
  311. on sloFwdQT
  312.   set the movieRate of sprite qtSprite =0
  313.   put the movieTime of sprite qtSprite into X
  314.   set X=X+6
  315.   set the movieTime of sprite qtSprite to X
  316.   updateStage
  317. end sloFwdQT
  318.  
  319. on fastForwardQT
  320.   if the movieRate of sprite qtSprite <> 4 then
  321.     set qtVol = 0
  322.     set qtSpeed = 4
  323.     playSome
  324.   else
  325.     set qtSpeed = 0
  326.     playSome
  327.   end if
  328. end fastForwardQT
  329.  
  330. ----This is the end
  331. ----of the QuickTime control section
  332.  
  333.  
  334.  
  335. ---Pool handlers
  336. on askPool
  337.   put line value(questLine) of field "PQin" into questIn
  338.   put line value(questLine) of field "PQout" into questOut
  339.   put line value(questLine) of field "PQYin" into yesIn
  340.   put line value(questLine) of field "PQYout" into yesOut
  341.   put line value(questLine) of field "PQNin" into noIn
  342.   put line value(questLine) of field "PQNout" into noOut
  343.   set the startTime of sprite qtSprite to value(questIn)
  344.   set the stopTime of sprite qtSprite to value(questOut)
  345.   set the movieTime of sprite qtSprite to value(questIn)
  346.   updateStage
  347.   set the volume of sprite qtSprite to 255
  348.   set the movieRate of sprite qtSprite to 1
  349. end askPool
  350.  
  351. on Yup
  352.   global questLine, yesIn, yesOut, whereNext
  353.   intro value(yesIn), value(yesOut)
  354.   put line value(questLine) of field "NextPQ" into X
  355.   put line value(questLine) of field "poolYcom" into whereNext
  356.   put chars(X, 1, 2) into Y
  357.   set questLine = value(Y)
  358. end Yup
  359.  
  360. on Nop
  361.   global questLine, noIn, noOut, whereNext
  362.   intro value(noIn), value(noOut)
  363.   put line value(questLine) of field "NextPQ" into X
  364.   put line value(questLine) of field "poolNcom" into whereNext
  365.   put chars(X, 3, 4) into Y
  366.   --put Y into cast D52
  367.   updateStage
  368.   set questLine = value(Y)
  369. end Nop
  370.  
  371. on poolYes
  372.   anIt
  373.   puppetSound "Clicker4"
  374.   updateStage
  375.   delay 360
  376.   unanIt
  377.   updateStage
  378.   delay 360
  379.   go to "Pooly"
  380. end poolYes
  381.  
  382. on poolNo
  383.   anIt
  384.   puppetSound "Clicker4"
  385.   updateStage
  386.   delay 360
  387.   unanIt
  388.   updateStage
  389.   delay 360
  390.   go to "Pooln"
  391. end poolNo
  392.  
  393. ----Bedroom handlers
  394. on askBed
  395.   global qtSprite, questLine, yesIn, yesOut, noIn, noOut, questOut
  396.   put line value(questLine) of field "Question In" into questIn
  397.   put line value(questLine) of field "Question Out" into questOut
  398.   --put value(questIn) into cast D27
  399.   --put value(questOut) into cast D28
  400.   --updateStage
  401.   put line value(questLine) of field "AnsYin" into yesIn
  402.   put line value(questLine) of field "AnsYout" into yesOut
  403.   put line value(questLine) of field "AnsNin" into noIn
  404.   put line value(questLine) of field "AnsNout" into noOut
  405.   set the startTime of sprite qtSprite to value(questIn)
  406.   set the movieTime of sprite qtSprite to value(questIn)
  407.   set the stopTime of sprite qtSprite to value(questOut)  
  408.   updateStage
  409.   if the movieTime of sprite qtSprite = value(questIn) then
  410.     updateStage
  411.     set the volume of sprite qtSprite to 255
  412.     set the movieRate of sprite qtSprite to 1
  413.   else
  414.     delay 5
  415.     updateStage
  416.   end if
  417. end askBed
  418.  
  419. on ansYbed
  420.   global questLine, yesIn, yesOut, whereNext
  421.   intro value(yesIn), value(yesOut)
  422.   --put value(yesIn) into cast D23
  423.   --put value(yesOut) into cast D24
  424.   updateStage
  425.   put line value(questLine) of field "NextYN" into X
  426.   put line value(questLine) of field "nextYcom" into whereNext
  427.   put chars(X, 1, 2) into Y
  428.   set questLine = value(Y)
  429. end ansYbed
  430.  
  431. on ansNbed
  432.   global questLine, noIn, noOut, whereNext
  433.   intro value(noIn), value(noOut)
  434.   put line value(questLine) of field "NextYN" into X
  435.   put line value(questLine) of field "nextNcom" into whereNext
  436.   put chars(X, 3, 4) into Y
  437.   --put Y into cast D28
  438.   --updateStage
  439.   set questLine = value(Y)
  440. end ansNbed
  441.  
  442.  
  443. on bedYes
  444.   anIt
  445.   puppetSound "Clicker4"
  446.   updateStage
  447.   delay 360
  448.   unanIt
  449.   updateStage
  450.   delay 360
  451.   go to "Bedy"
  452. end bedYes
  453.  
  454. on bedNo
  455.   anIt
  456.   puppetSound "Clicker4"
  457.   updateStage
  458.   delay 360
  459.   unanIt
  460.   updateStage
  461.   delay 360
  462.   go to "Bedn"
  463. end bedNo
  464.  
  465.  
  466. on repLoop
  467.   global questOut
  468.   if the movieTime of sprite 11 < questOut then
  469.     go to the frame
  470.   else
  471.     set the movieTime of sprite 11 to value(questOut)
  472.     set the movieRate of sprite 11 to 0
  473.     go to the frame
  474.   end if
  475. end repLoop
  476.  
  477.  
  478. on repYes
  479.   global yesOut, whereNext
  480.   if the movieTime of sprite 11 < value(yesOut) then
  481.     --if the movieTime of sprite 11 < the stopTime of sprite 11 then
  482.     go to the frame
  483.   else
  484.     Do whereNext
  485.   end if
  486. end repYes
  487.  
  488. on repNo
  489.   global noOut, whereNext
  490.   if the movieTime of sprite 11 < value(noOut) then
  491.     go to the frame
  492.   else
  493.     delay 120
  494.     Do whereNext
  495.   end if
  496. end repNo
  497.  
  498.  
  499.  
  500.