home *** CD-ROM | disk | FTP | other *** search
/ Treasure Mathstorm / TMSWINCD.ISO / pc / install / lab2.mps < prev    next >
Text File  |  1996-10-14  |  18KB  |  736 lines

  1. ;ws203.mps
  2. ;mods for labdemo by Andy Wally 10/97
  3. Labyrinth on
  4.  
  5. yield off
  6.  
  7. ;consts
  8.  
  9. ;settled
  10. joniSetId=11802
  11. santiagoSetId=11803
  12. laptrapSetId=11807
  13. spider1SetId=11805
  14. spider2SetId=11806
  15.  
  16. ;bod
  17. joniLipsId=11814
  18. joniArmsId=11820
  19. joniBodId=11808
  20. santiagoLipsId=11815
  21. santiagoArmsId=11821
  22. santiagoBodId=11809
  23. spider1LipsId=11816
  24. spider1ArmsId=11822
  25. spider1BodId=11810
  26. spider2LipsId=11817
  27. spider2ArmsId=11823
  28. spider2BodId=11811
  29.  
  30. ;fidgets
  31. joniFidgetsId=[11826 11827 11828
  32. santiagoFidgetsId=[11829 11830 11831
  33. spider1FidgetId=11832
  34. spider2FidgetId=11833
  35.  
  36. ;exit/enter
  37. joniEnterEId=11840
  38. joniExitEId=11846
  39. joniEnterWId=11837
  40. joniExitWId=11843
  41. santiagoEnterEId=11841
  42. santiagoExitEId=11847
  43. santiagoEnterWId=11838
  44. santiagoExitWId=11844
  45. laptrapEnterEId=11842
  46. laptrapExitEId=11848
  47. laptrapEnterWId=11839
  48. laptrapExitWId=11845
  49.  
  50. ;speech
  51. joniCPreSpchId=[11878 11879
  52. joniCPostSpchId=[11880 11881
  53. joniSolvedSpchId=11877
  54. santiagoCPreSpchId=[11882 11883
  55. santiagoCPostSpchId=[11884 11885
  56. santiagoWrongSpchId=11872
  57. santiagoSolvedSpchId=11876
  58. spider1CPreSpchId=[11863 11864
  59. spider1CPostSpchId=[11888 11889
  60. spider1IntroSpchId=[11850 11852 11858
  61. spider1SolvedSpchId=11875
  62. spider2CPreSpchId=[11861 11862
  63. spider2CPostSpchId=[11886 11887
  64. spider2IntroSpchId=[11851 11853 11854 11855 11856 11857 11859
  65. spider2RetSpchId=11860
  66. spider2WrongSpchId=11871
  67. spider2SolvedSpchId=[11873 11874
  68. owenPreASpchId=[11890 11891 11892 11893
  69. owenPreBSpchId=[11865 11866
  70. owenPostSpchId=11870
  71. lesliePreSpchId=[11867 11868
  72. lesliePostSpchId=11869
  73.  
  74. spider1DescId=11859
  75. spider2DescId=11860
  76. joniReactId=11861
  77. santiagoReactId=11862
  78. radioLightId=11834
  79. backpackLightId=11835
  80. laptrapLightId=11836
  81.  
  82. crabFlyId=11849
  83. spidersDineId=11853
  84. spidersCrawlId=11855
  85. JSHighFiveId=11854
  86. purplePatchFloatId=11858
  87. purpleBubbleId=11852
  88. beetleBagSplurtId=11856
  89. beetleBagSparkleId=11857
  90.  
  91. ;sfx
  92. spidersDescSfxId=11821
  93. ambSfxId=11812
  94. spidersDineSfxId=11817
  95. spidersCrawlSfxId=11823
  96. JSHighFiveSfxId=11818
  97. beetleBagSplurtSfxId=11819
  98. beetleBagSparkleSfxId=11820
  99. purpleBubbleSfxId=11815
  100. answerPickUpSfxId=11813
  101. answerSnapSfxId=11814
  102. answerGoHomeSfxId=11816
  103. backpackSfxId=11810
  104.  
  105. ;groups
  106. preloadGroupId=11800
  107. enterWGroupId=11810
  108. enterEGroupId=11811
  109. exitWGroupId=11820
  110. exitEGroupId=11821
  111.  
  112. backgroundId=11800
  113.  
  114. ;ws201
  115. WSceneId=11600
  116. ;ws205
  117. ESceneId=12400
  118.  
  119. ;initial opened pouch
  120. whichPouch=1
  121.  
  122. ;z values
  123. exitSpotZ=2
  124. crabFlyZ=4
  125. answersZ=6
  126. bugsLZ=8
  127. bugRZ=10
  128. spidersZ=12
  129. santiagoZ=20
  130. joniZ=22
  131. laptrapZ=24
  132. purplePatchZ=30
  133. purpleBubbleZ=32
  134. gooSpotZ=34
  135. beetleBagZ=36
  136. radioSpotZ=60
  137. backpackSpotZ=62
  138. toolkitZ=80
  139.  
  140. ;//////////////////////////////
  141.  
  142. include com.mps
  143. ;xtra line
  144. include data203.mps
  145. ;xtra line
  146. ;include help.mps
  147.  
  148. ;//////////////////////////////
  149.  
  150.  
  151. ;global access
  152. ;worldMem=RWorldPort
  153. ;get worldMem priorScene prior
  154. ;set worldMem priorScene backgroundId
  155. ;get worldMem puzzleLevel logic level
  156. ;get worldMem intVariable been203 beenHere
  157. ;if beenHere=0
  158. ;  set worldMem intVariable been203 1
  159. level=1
  160. beenHere=0
  161. prior=0
  162.  
  163. joniClickCtr=1
  164. santiagoClickCtr=1
  165. spider1ClickCtr=1
  166. spider2ClickCtr=1
  167. helpClickCtr=1
  168. wrongCtr=1
  169.  
  170. puzzleCompleted=False
  171.  
  172. UseResourceGroupFile "wscommon.grp"
  173. UseResourceGroupFile "ws203.grp"
  174. UseResourceGroupFile "help.grp"
  175.  
  176. call init
  177. yield on
  178.  
  179. ;///////////////////////////////
  180.  
  181. procedure init
  182. [
  183.   LoadResourceGroup preloadGroupId
  184.  
  185.   musicLoop=RBackgroundSound loopBMusicId
  186.   play musicLoop start
  187.  
  188.   scene=RScene backgroundId
  189.   play scene setScreenCursor deadCursor
  190.   set scene laptrapClosed laptrapDone
  191.   set scene goToSignin exitToSignin
  192.   set scene toolTaken saveToolState
  193.   play scene start
  194.  
  195.   joni=RCharacter joniSetId -1 -1 joniZ
  196.   santiago=RCharacter santiagoSetId -1 -1 santiagoZ
  197.   laptrap=RCharacter laptrapSetId -1 -1 laptrapZ
  198.   spider1=RCharacter spider1SetId -1 -1 spidersZ
  199.   spider2=RCharacter spider2SetId -1 -1 spidersZ
  200.   call initChars
  201.  
  202. ;  get worldMem intVariable treasuresLeft203 treasuresLeft
  203. ;  if treasuresLeft
  204. ;    play scene dropTreasure beetleBagSparkleId purpleBeetleBagTool -1 -1 beetleBagZ treasuresLeft
  205.  
  206.   fidgetManager=FidgetManager
  207.   call initFidgetManager
  208.   play fidgetManager start
  209.  
  210.   crabFly=RAmbientAnim crabFlyId -1 -1 crabFlyZ 10 0
  211.   play crabFly start
  212.   purplePatchFloat=RAmbientAnim purplePatchFloatId -1 -1 purplePatchZ 0 0
  213.   play purplePatchFloat start
  214.   ambSfx=RSound ambSfxId 0
  215.   play ambSfx start
  216.  
  217.   puzzle=RPuzzle
  218.   call initPuzzleC
  219.   set puzzle scrambleAnswers true
  220.   play puzzle start
  221.  
  222.   call createHotSpots
  223.  
  224.   ;do this after the hotspots are set up
  225. ;  call setupBackpack
  226.  
  227.   ;intro
  228.   if prior=0
  229.   [
  230.     play joni showPose
  231.     play santiago showPose
  232.     play laptrap showPose
  233.     play spider1 showPose
  234.     play spider2 showPose
  235.  
  236.     call entrySpeech
  237.   ]
  238.   else
  239.   [
  240.     play spider1 hidePose
  241.     play spider2 hidePose
  242.  
  243.     call entrance
  244.   ]
  245. ]
  246.  
  247. procedure initChars
  248. [
  249.   ;add anims
  250.   call addAnimsJoniC
  251.   call addAnimsSantiagoC
  252.   call addAnimsLaptrapC
  253.   ;spider1
  254.   play spider1 setHead spider1LipsId -1 -1
  255.   play spider1 setArms spider1ArmsId -1 -1
  256.   play spider1 setBody spider1BodId -1 -1
  257.   play spider1 setAnim spider1FidgetId -2 -2
  258.   ;spider2
  259.   play spider2 setHead spider2LipsId -1 -1
  260.   play spider2 setArms spider2ArmsId -1 -1
  261.   play spider2 setBody spider2BodId -1 -1
  262.   play spider2 setAnim spider2FidgetId -2 -2
  263.  
  264.   ;set clicks
  265.   call setCharClicksC
  266.   set spider1 clicked spider1Clicked
  267.   set spider2 clicked spider2Clicked
  268.  
  269.   ;set cursors
  270.   call setCharCursorsC
  271.   set spider1 cursor liveCursor
  272.   set spider2 cursor liveCursor
  273.  
  274.   set laptrap animateSettled true
  275. ]
  276.  
  277. procedure initFidgetManager
  278. [
  279.   joniFidg1=CharacterAction "joni" fidgetAnim joniFidgetsId.1
  280.   joniFidg2=CharacterAction "joni" fidgetAnim joniFidgetsId.2
  281.   joniFidg3=CharacterAction "joni" fidgetAnim joniFidgetsId.3
  282.   santiagoFidg1=CharacterAction "santiago" fidgetAnim santiagoFidgetsId.1
  283.   santiagoFidg2=CharacterAction "santiago" fidgetAnim santiagoFidgetsId.2
  284.   santiagoFidg3=CharacterAction "santiago" fidgetAnim santiagoFidgetsId.3
  285.   spider1Fidg1=CharacterAction "spider1" fidgetAnim spider1FidgetId
  286.   spider1Fidg2=CharacterAction "spider1" fidgetAnim spider1FidgetId
  287.   spider1Fidg3=CharacterAction "spider1" fidgetAnim spider1FidgetId
  288.   spider2Fidg1=CharacterAction "spider2" fidgetAnim spider2FidgetId
  289.   spider2Fidg2=CharacterAction "spider2" fidgetAnim spider2FidgetId
  290.   spider2Fidg3=CharacterAction "spider2" fidgetAnim spider2FidgetId
  291.  
  292.   play fidgetManager add "joniFidg1" 10
  293.   play fidgetManager add "spider2Fidg3" 10
  294.   play fidgetManager add "santiagoFidg1" 10
  295.   play fidgetManager add "spider1Fidg1" 10
  296.   play fidgetManager add "joniFidg2" 10
  297.   play fidgetManager add "spider2Fidg1" 10
  298.   play fidgetManager add "santiagoFidg3" 10
  299.   play fidgetManager add "joniFidg3" 10
  300.   play fidgetManager add "spider1Fidg2" 10
  301.   play fidgetManager add "santiagoFidg2" 10
  302.   play fidgetManager add "spider2Fidg2" 10
  303.   play fidgetManager add "spider1Fidg3" 10
  304. ]
  305.  
  306. procedure createHotSpots
  307. [
  308.   ;navigation
  309. ;  exitSpotW=RCHotSpot 0 283 68 479
  310. ;  set exitSpotW zOrder exitSpotZ
  311. ;  set exitSpotW cursor westCursor
  312. ;  set exitSpotW hit goWest
  313.  
  314. ;  exitSpotE=RCHotSpot 530 380 639 439
  315. ;  set exitSpotE zOrder exitSpotZ
  316. ;  set exitSpotE cursor eastCursor
  317. ;  set exitSpotE hit goEast
  318.  
  319. ;demostuff
  320.  
  321. pbExit=RPButton 592 451 31005
  322. set pbExit "hit" leavepreviews
  323.  
  324.  
  325. pbDemos=RPButton 496 451 31006
  326. set pbDemos "hit" leavethispreview
  327.  
  328.  
  329. ;txtExit=RText 590 440 640 480 10 25 "Exit" 1 0 "Arial" 0
  330. ;txtDemos=RText 450 440 590 480 10 25  "Demo Menu" 1 0 "Arial" 0
  331. ;txtForward=RText 250 440 350 480 10 25  "Forward" 1 0 "Arial" 0
  332. ;txtBack=RText 180 440 250 480 10 25  "Back" 1 0 "Arial" 0
  333.  
  334. ;hsExit=RHotSpot 580 440 640 480
  335. ;hsDemos=RHotSpot 450 440 580 480
  336. ;hsForward=RHotSpot 250 440 350 480
  337. ;hsBack=RHotSpot 180 440 250 480
  338.  
  339. ;set hsExit "hit" killdemos
  340. ;set hsDemos "hit" killthisdemo
  341. ;set hsForward "hit" next
  342. ;set hsBack "hit" previous
  343.  
  344. ;end demostuff
  345.  
  346.  
  347.   ;tickle
  348.   gooSpot=RCHotSpot 23 453 78 476
  349.   set gooSpot zOrder gooSpotZ
  350.   set gooSpot cursor liveCursor
  351.   set gooSpot hit gooAreaClicked
  352.  
  353. ;  call showBackpackSpot 11 230 39 291
  354.  
  355. ;  call showRadioSpot 151 253 180 283
  356. ]
  357.  
  358. procedure addToPuzzle
  359. [
  360.   ;answers
  361.   bug1=RAnswer 1 0 401 112 answersZ
  362.   bug2=RAnswer 2 0 357 188 answersZ
  363.   bug3=RAnswer 3 0 461 167 answersZ
  364.   bug4=RAnswer 4 0 350 282 answersZ
  365.   bug5=RAnswer 5 0 451 261 answersZ
  366.  
  367.   ;container
  368.   container=RContainer 1 573 304 629 361
  369.  
  370.   ;puzzle graphics
  371.   bugsL=RPuzzleGraphic 1 191 282 bugsLZ false
  372.   bugR=RPuzzleGraphic 2 518 304 bugRZ false
  373. ]
  374.  
  375. procedure entrance
  376. [
  377. ]
  378.  
  379. procedure spidersEntrance
  380. [
  381.   ;uncomment (when res available)
  382.   play spider1 setAnim spider1DescId -1 -1
  383.   play spider2 setAnim spider2DescId -1 -1
  384. ;  play joni setAnim joniReact -2 -2
  385. ;  play santiago setAnim santiagoReact -2 -2
  386.  
  387.   spider1Desc=CharacterAction "spider1" characterAnim spider1DescId
  388.   spider2Desc=CharacterAction "spider2" characterAnim spider2DescId
  389. ;  joniReact=CharacterAction "joni" characterAnim joniReactId
  390. ;  santiagoReact=CharacterAction "santiago" characterAnim santiagoReactId
  391.   spidersDescSfx=SoundAction spidersDescSfxId
  392.  
  393.   entryCompAct=CompositeAction
  394.   play entryCompAct add "spider1Desc"
  395.   play entryCompAct add "spider2Desc"
  396. ;  play entryCompAct add "joniReact"
  397. ;  play entryCompAct add "santiagoReact"
  398.   play entryCompAct add "spidersDescSfx"
  399.  
  400.   play scene addToQueueBack "entryCompAct"
  401.  
  402.   set scene queueFinished entrySpeech
  403.   play scene startQueue
  404. ]
  405.  
  406. procedure entrySpeech
  407. [
  408.   if beenHere=0
  409.   [
  410.     spider1Spch1=SpeechAction "spider1" spider1IntroSpchId.1
  411.     spider2Spch1=SpeechAction "spider2" spider2IntroSpchId.1
  412.     spider1Spch2=SpeechAction "spider1" spider1IntroSpchId.2
  413.     spider2Spch2=SpeechAction "spider2" spider2IntroSpchId.2
  414.     spider2Spch3=SpeechAction "spider2" spider2IntroSpchId.3
  415.     spider2Spch4=SpeechAction "spider2" spider2IntroSpchId.4
  416.     spider2Spch5=SpeechAction "spider2" spider2IntroSpchId.5
  417.     spider2Spch6=SpeechAction "spider2" spider2IntroSpchId.6
  418.     spider1Spch3=SpeechAction "spider1" spider1IntroSpchId.3
  419.     spider2Spch7=SpeechAction "spider2" spider2IntroSpchId.7
  420.  
  421.     play scene addToQueueBack "spider1Spch1"
  422.     play scene addToQueueBack "spider2Spch1"
  423.     play scene addToQueueBack "spider1Spch2"
  424.     play scene addToQueueBack "spider2Spch2"
  425.     play scene addToQueueBack "spider2Spch3"
  426.     play scene addToQueueBack "spider2Spch4"
  427.     play scene addToQueueBack "spider2Spch5"
  428.     play scene addToQueueBack "spider2Spch6"
  429.     play scene addToQueueBack "spider1Spch3"
  430.     play scene addToQueueBack "spider2Spch7"
  431.   ]
  432.   else
  433.   [
  434.     spider2Spch=SpeechAction "spider2" spider2RetSpchId
  435.  
  436.     play scene addToQueueBack "spider2Spch"
  437.   ]
  438.  
  439.   set scene queueFinished nothing
  440.   play scene startQueue
  441. ]
  442.  
  443. procedure playerWrong
  444. [
  445.   if wrongCtr=1
  446.     spch=SpeechAction "spider2" spider2WrongSpchId
  447.   else
  448.     spch=SpeechAction "santiago" santiagoWrongSpchId
  449.  
  450.   if wrongCtr=1
  451.     wrongCtr=2
  452.   else
  453.     wrongCtr=1
  454.  
  455.   play scene addToQueueBack "spch"
  456.  
  457.   set scene queueFinished nothing
  458.   play scene startQueue
  459. ]
  460.  
  461. procedure playerSolved
  462. [
  463.   set scene queueInterruptible 0
  464.   set joni clicked
  465.   set santiago clicked
  466.   set spider1 clicked
  467.   set spider2 clicked
  468.   set gooSpot hit
  469.   joniClickCtr=1
  470.   santiagoClickCtr=1
  471.   spider1ClickCtr=1
  472.   spider2ClickCtr=1
  473.   helpClickCtr=1
  474.   puzzleCompleted=True
  475.  
  476.  
  477.   spidersDine=AnimAction spidersDineId -1 -1 spidersZ spidersDineSfxId
  478.   ;hide eaten bugs
  479.   hideBugsL=HidePuzzleGraphicAction "bugsL"
  480.   hideBugR=HidePuzzleGraphicAction "bugR"
  481.   hideAnswer=HideAnswerAction
  482.   spidersCrawl=AnimAction spidersCrawlId -1 -1 spidersZ spidersCrawlSfxId
  483.   showSpider1=SettledPoseAction "spider1"
  484.   showSpider2=SettledPoseAction "spider2"
  485.   hideJoni=SetHidePoseAction "joni"
  486.   hideSantiago=SetHidePoseAction "santiago"
  487.   JSHighFive=AnimAction JSHighFiveId -1 -1 joniZ 0
  488.   play JSHighFive addFrameSound 6 JSHighFiveSfxId
  489.   showJoni=SettledPoseAction "joni"
  490.   showSantiago=SettledPoseAction "santiago"
  491.   spider2Spch1=SpeechAction "spider2" spider2SolvedSpchId.1
  492.   spider2Spch2=SpeechAction "spider2" spider2SolvedSpchId.2
  493.   spider1Spch=SpeechAction "spider1" spider1SolvedSpchId
  494.   beetleBagSplurt=AnimAction beetleBagSplurtId -1 -1 beetleBagZ beetleBagSplurtSfxId
  495.   beetleBagSparkleSfx=SoundAction beetleBagSparkleSfxId
  496.   treasure=TreasureAction beetleBagSparkleId purpleBeetleBagTool -1 -1 beetleBagZ
  497.   santiagoSpch=SpeechAction "santiago" santiagoSolvedSpchId
  498.   joniSpch=SpeechAction "joni" joniSolvedSpchId
  499.   sNIB=StartNIBAction
  500.   eNIB=EndNIBAction
  501.  
  502.   play scene addToQueueBack "spidersDine"
  503.   play scene addToQueueBack "hideBugsL"
  504.   play scene addToQueueBack "hideBugR"
  505.   play scene addToQueueBack "hideAnswer"
  506.   play scene addToQueueBack "spidersCrawl"
  507.   play scene addToQueueBack "showSpider1"
  508.   play scene addToQueueBack "showSpider2"
  509.   play scene addToQueueBack "hideJoni"
  510.   play scene addToQueueBack "hideSantiago"
  511.   play scene addToQueueBack "JSHighFive"
  512.   play scene addToQueueBack "showJoni"
  513.   play scene addToQueueBack "showSantiago"
  514.   play scene addToQueueBack "spider2Spch1"
  515.   play scene addToQueueBack "spider2Spch2"
  516.   play scene addToQueueBack "spider1Spch"
  517.   play scene addToQueueBack "sNIB"
  518.   play scene addToQueueBack "beetleBagSplurt"
  519.   play scene addToQueueBack "eNIB"
  520. ;  play scene addToQueueBack "treasure"
  521.   play scene addToQueueBack "beetleBagSparkleSfx"
  522.   play scene addToQueueBack "santiagoSpch"
  523.   play scene addToQueueBack "joniSpch"
  524.   play spider1 hidePose
  525.   play spider2 hidePose
  526.  
  527.  
  528.  
  529. ;  set scene queueFinished saveToolState
  530.   set scene queueFinished goEast
  531.   play scene startQueue
  532. ]
  533.  
  534. procedure gooAreaClicked
  535. [
  536.   purpleBubble=AnimAction purpleBubbleId -1 -1 purpleBubbleZ purpleBubbleSfxId
  537.   play scene addToQueueBack "purpleBubble"
  538.  
  539.   set scene queueFinished nothing
  540.   play scene startQueue
  541. ]
  542.  
  543. procedure joniClicked
  544. [
  545. ;  if puzzleCompleted=False
  546.     joniSpch=SpeechAction "joni" joniCPreSpchId.joniClickCtr
  547. ;  else
  548. ;    joniSpch=SpeechAction "joni" joniCPostSpchId.joniClickCtr
  549.  
  550.   play scene addToQueueBack "joniSpch"
  551.  
  552.   if joniClickCtr=1
  553.     joniClickCtr=2
  554.   else
  555.     joniClickCtr=1
  556.  
  557.   set scene queueFinished nothing
  558.   play scene startQueue
  559. ]
  560.  
  561. procedure santiagoClicked
  562. [
  563. ;  if puzzleCompleted=False
  564.     santiagoSpch=SpeechAction "santiago" santiagoCPreSpchId.santiagoClickCtr
  565. ;  else
  566. ;    santiagoSpch=SpeechAction "santiago" santiagoCPostSpchId.santiagoClickCtr
  567.  
  568.   play scene addToQueueBack "santiagoSpch"
  569.  
  570.   if santiagoClickCtr=1
  571.     santiagoClickCtr=2
  572.   else
  573.     santiagoClickCtr=1
  574.  
  575.   set scene queueFinished nothing
  576.   play scene startQueue
  577. ]
  578.  
  579. procedure spider1Clicked
  580. [
  581. ;  if puzzleCompleted=False
  582.     spider1Spch=SpeechAction "spider1" spider1CPreSpchId.spider1ClickCtr
  583. ;  else
  584. ;    spider1Spch=SpeechAction "spider1" spider1CPostSpchId.spider1ClickCtr
  585.  
  586.   play scene addToQueueBack "spider1Spch"
  587.  
  588.   if spider1ClickCtr=1
  589.     spider1ClickCtr=2
  590.   else
  591.     spider1ClickCtr=1
  592.  
  593.   set scene queueFinished nothing
  594.   play scene startQueue
  595. ]
  596.  
  597. procedure spider2Clicked
  598. [
  599. ;  if puzzleCompleted=False
  600.     spider2Spch=SpeechAction "spider2" spider2CPreSpchId.spider2ClickCtr
  601. ;  else
  602. ;    spider2Spch=SpeechAction "spider2" spider2CPostSpchId.spider2ClickCtr
  603.  
  604.   play scene addToQueueBack "spider2Spch"
  605.  
  606.   if spider2ClickCtr=1
  607.     spider2ClickCtr=2
  608.   else
  609.     spider2ClickCtr=1
  610.  
  611.   set scene queueFinished nothing
  612.   play scene startQueue
  613. ]
  614.  
  615. procedure goWest
  616. [
  617.   set scene queueInterruptible 0
  618. ;  loadAct=LoadResourceGroupAction exitWGroupId
  619.   ;unloadAct=UnloadResourceGroupAction exitWGroupId
  620.   sNIB=StartNIBAction
  621.   eNIB=EndNIBAction
  622.  
  623.   play scene addToQueueBack "sNIB"
  624. ;  play scene addToQueueBack "loadAct"
  625.   call addQMoveActions joniExitWId santiagoExitWId laptrapExitWId 1
  626.   ;play scene addToQueueBack "unloadAct"
  627.   play scene addToQueueBack "eNIB"
  628.  
  629.   set scene queueFinished exitWest
  630.   play scene startQueue
  631. ]
  632.  
  633.  
  634.  
  635.  
  636. procedure goEast
  637. [
  638.   set scene queueInterruptible 0
  639.   loadAct=LoadResourceGroupAction exitEGroupId
  640.   ;unloadAct=UnloadResourceGroupAction exitEGroupId
  641.   sNIB=StartNIBAction
  642.   eNIB=EndNIBAction
  643.  
  644.   play scene addToQueueBack "sNIB"
  645.   play scene addToQueueBack "loadAct"
  646.   call addQMoveActions joniExitEId santiagoExitEId laptrapExitEId 1
  647.   ;play scene addToQueueBack "unloadAct"
  648.   play scene addToQueueBack "eNIB"
  649.  
  650.   set scene queueFinished exitEast
  651.   play scene startQueue
  652. ]
  653.  
  654. procedure saveToolState
  655. [
  656.   get scene treasuresShowing treasuresLeft
  657. ;  set worldMem intVariable treasuresLeft203 treasuresLeft
  658. ]
  659.  
  660. procedure leaving
  661. [
  662. play musicLoop stop
  663.   UnloadResourceGroup preloadGroupId
  664.  
  665.   CloseResourceGroupFile "wscommon.grp"
  666.   CloseResourceGroupFile "ws203.grp"
  667.   CloseResourceGroupFile "help.grp"
  668. ]
  669.  
  670. procedure exitWest
  671. [
  672.   call leaving
  673.  
  674. ;Labyrinth off
  675. relay lab1.mps
  676. ]
  677.  
  678. procedure exitEast
  679. [
  680.   call leaving
  681.  
  682. relay lab3.mps
  683. ]
  684.  
  685. procedure exitToSignin
  686. [
  687. ;  call leaving
  688. ;
  689. ;  relay "signin.mps"
  690. ]
  691.  
  692. procedure killdemos
  693.     [
  694.    quit
  695.    ]
  696.  
  697. procedure killthisdemo
  698.     [
  699.    drop script stack
  700.    relay autorun.mps
  701.    ]
  702.  
  703. procedure next
  704.     [
  705.    call exitEast
  706.    ]
  707.  
  708. procedure previous
  709.     [
  710.    call exitWest
  711.    ]
  712.  
  713. procedure leavethispreview
  714.   [
  715.   play musicLoop stop
  716. Labyrinth off
  717. ;  click=RSound 31405 -1
  718. ;  play click start
  719. ;  pause 1
  720.   exit
  721.   ]
  722.  
  723.  
  724. procedure leavepreviews
  725.   [
  726.   wp=RWorldPort
  727.   firsttime=0
  728.   set wp intVariable 1 firsttime
  729.   Labyrinth off
  730. ;  click=RSound 31405 -1
  731. ;  play click start
  732. ;  pause 1
  733.   quit
  734.   ]
  735.  
  736.