home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Treasure Mathstorm
/
TMSWINCD.ISO
/
pc
/
install
/
lab2.mps
< prev
next >
Wrap
Text File
|
1996-10-14
|
18KB
|
736 lines
;ws203.mps
;mods for labdemo by Andy Wally 10/97
Labyrinth on
yield off
;consts
;settled
joniSetId=11802
santiagoSetId=11803
laptrapSetId=11807
spider1SetId=11805
spider2SetId=11806
;bod
joniLipsId=11814
joniArmsId=11820
joniBodId=11808
santiagoLipsId=11815
santiagoArmsId=11821
santiagoBodId=11809
spider1LipsId=11816
spider1ArmsId=11822
spider1BodId=11810
spider2LipsId=11817
spider2ArmsId=11823
spider2BodId=11811
;fidgets
joniFidgetsId=[11826 11827 11828
santiagoFidgetsId=[11829 11830 11831
spider1FidgetId=11832
spider2FidgetId=11833
;exit/enter
joniEnterEId=11840
joniExitEId=11846
joniEnterWId=11837
joniExitWId=11843
santiagoEnterEId=11841
santiagoExitEId=11847
santiagoEnterWId=11838
santiagoExitWId=11844
laptrapEnterEId=11842
laptrapExitEId=11848
laptrapEnterWId=11839
laptrapExitWId=11845
;speech
joniCPreSpchId=[11878 11879
joniCPostSpchId=[11880 11881
joniSolvedSpchId=11877
santiagoCPreSpchId=[11882 11883
santiagoCPostSpchId=[11884 11885
santiagoWrongSpchId=11872
santiagoSolvedSpchId=11876
spider1CPreSpchId=[11863 11864
spider1CPostSpchId=[11888 11889
spider1IntroSpchId=[11850 11852 11858
spider1SolvedSpchId=11875
spider2CPreSpchId=[11861 11862
spider2CPostSpchId=[11886 11887
spider2IntroSpchId=[11851 11853 11854 11855 11856 11857 11859
spider2RetSpchId=11860
spider2WrongSpchId=11871
spider2SolvedSpchId=[11873 11874
owenPreASpchId=[11890 11891 11892 11893
owenPreBSpchId=[11865 11866
owenPostSpchId=11870
lesliePreSpchId=[11867 11868
lesliePostSpchId=11869
spider1DescId=11859
spider2DescId=11860
joniReactId=11861
santiagoReactId=11862
radioLightId=11834
backpackLightId=11835
laptrapLightId=11836
crabFlyId=11849
spidersDineId=11853
spidersCrawlId=11855
JSHighFiveId=11854
purplePatchFloatId=11858
purpleBubbleId=11852
beetleBagSplurtId=11856
beetleBagSparkleId=11857
;sfx
spidersDescSfxId=11821
ambSfxId=11812
spidersDineSfxId=11817
spidersCrawlSfxId=11823
JSHighFiveSfxId=11818
beetleBagSplurtSfxId=11819
beetleBagSparkleSfxId=11820
purpleBubbleSfxId=11815
answerPickUpSfxId=11813
answerSnapSfxId=11814
answerGoHomeSfxId=11816
backpackSfxId=11810
;groups
preloadGroupId=11800
enterWGroupId=11810
enterEGroupId=11811
exitWGroupId=11820
exitEGroupId=11821
backgroundId=11800
;ws201
WSceneId=11600
;ws205
ESceneId=12400
;initial opened pouch
whichPouch=1
;z values
exitSpotZ=2
crabFlyZ=4
answersZ=6
bugsLZ=8
bugRZ=10
spidersZ=12
santiagoZ=20
joniZ=22
laptrapZ=24
purplePatchZ=30
purpleBubbleZ=32
gooSpotZ=34
beetleBagZ=36
radioSpotZ=60
backpackSpotZ=62
toolkitZ=80
;//////////////////////////////
include com.mps
;xtra line
include data203.mps
;xtra line
;include help.mps
;//////////////////////////////
;global access
;worldMem=RWorldPort
;get worldMem priorScene prior
;set worldMem priorScene backgroundId
;get worldMem puzzleLevel logic level
;get worldMem intVariable been203 beenHere
;if beenHere=0
; set worldMem intVariable been203 1
level=1
beenHere=0
prior=0
joniClickCtr=1
santiagoClickCtr=1
spider1ClickCtr=1
spider2ClickCtr=1
helpClickCtr=1
wrongCtr=1
puzzleCompleted=False
UseResourceGroupFile "wscommon.grp"
UseResourceGroupFile "ws203.grp"
UseResourceGroupFile "help.grp"
call init
yield on
;///////////////////////////////
procedure init
[
LoadResourceGroup preloadGroupId
musicLoop=RBackgroundSound loopBMusicId
play musicLoop start
scene=RScene backgroundId
play scene setScreenCursor deadCursor
set scene laptrapClosed laptrapDone
set scene goToSignin exitToSignin
set scene toolTaken saveToolState
play scene start
joni=RCharacter joniSetId -1 -1 joniZ
santiago=RCharacter santiagoSetId -1 -1 santiagoZ
laptrap=RCharacter laptrapSetId -1 -1 laptrapZ
spider1=RCharacter spider1SetId -1 -1 spidersZ
spider2=RCharacter spider2SetId -1 -1 spidersZ
call initChars
; get worldMem intVariable treasuresLeft203 treasuresLeft
; if treasuresLeft
; play scene dropTreasure beetleBagSparkleId purpleBeetleBagTool -1 -1 beetleBagZ treasuresLeft
fidgetManager=FidgetManager
call initFidgetManager
play fidgetManager start
crabFly=RAmbientAnim crabFlyId -1 -1 crabFlyZ 10 0
play crabFly start
purplePatchFloat=RAmbientAnim purplePatchFloatId -1 -1 purplePatchZ 0 0
play purplePatchFloat start
ambSfx=RSound ambSfxId 0
play ambSfx start
puzzle=RPuzzle
call initPuzzleC
set puzzle scrambleAnswers true
play puzzle start
call createHotSpots
;do this after the hotspots are set up
; call setupBackpack
;intro
if prior=0
[
play joni showPose
play santiago showPose
play laptrap showPose
play spider1 showPose
play spider2 showPose
call entrySpeech
]
else
[
play spider1 hidePose
play spider2 hidePose
call entrance
]
]
procedure initChars
[
;add anims
call addAnimsJoniC
call addAnimsSantiagoC
call addAnimsLaptrapC
;spider1
play spider1 setHead spider1LipsId -1 -1
play spider1 setArms spider1ArmsId -1 -1
play spider1 setBody spider1BodId -1 -1
play spider1 setAnim spider1FidgetId -2 -2
;spider2
play spider2 setHead spider2LipsId -1 -1
play spider2 setArms spider2ArmsId -1 -1
play spider2 setBody spider2BodId -1 -1
play spider2 setAnim spider2FidgetId -2 -2
;set clicks
call setCharClicksC
set spider1 clicked spider1Clicked
set spider2 clicked spider2Clicked
;set cursors
call setCharCursorsC
set spider1 cursor liveCursor
set spider2 cursor liveCursor
set laptrap animateSettled true
]
procedure initFidgetManager
[
joniFidg1=CharacterAction "joni" fidgetAnim joniFidgetsId.1
joniFidg2=CharacterAction "joni" fidgetAnim joniFidgetsId.2
joniFidg3=CharacterAction "joni" fidgetAnim joniFidgetsId.3
santiagoFidg1=CharacterAction "santiago" fidgetAnim santiagoFidgetsId.1
santiagoFidg2=CharacterAction "santiago" fidgetAnim santiagoFidgetsId.2
santiagoFidg3=CharacterAction "santiago" fidgetAnim santiagoFidgetsId.3
spider1Fidg1=CharacterAction "spider1" fidgetAnim spider1FidgetId
spider1Fidg2=CharacterAction "spider1" fidgetAnim spider1FidgetId
spider1Fidg3=CharacterAction "spider1" fidgetAnim spider1FidgetId
spider2Fidg1=CharacterAction "spider2" fidgetAnim spider2FidgetId
spider2Fidg2=CharacterAction "spider2" fidgetAnim spider2FidgetId
spider2Fidg3=CharacterAction "spider2" fidgetAnim spider2FidgetId
play fidgetManager add "joniFidg1" 10
play fidgetManager add "spider2Fidg3" 10
play fidgetManager add "santiagoFidg1" 10
play fidgetManager add "spider1Fidg1" 10
play fidgetManager add "joniFidg2" 10
play fidgetManager add "spider2Fidg1" 10
play fidgetManager add "santiagoFidg3" 10
play fidgetManager add "joniFidg3" 10
play fidgetManager add "spider1Fidg2" 10
play fidgetManager add "santiagoFidg2" 10
play fidgetManager add "spider2Fidg2" 10
play fidgetManager add "spider1Fidg3" 10
]
procedure createHotSpots
[
;navigation
; exitSpotW=RCHotSpot 0 283 68 479
; set exitSpotW zOrder exitSpotZ
; set exitSpotW cursor westCursor
; set exitSpotW hit goWest
; exitSpotE=RCHotSpot 530 380 639 439
; set exitSpotE zOrder exitSpotZ
; set exitSpotE cursor eastCursor
; set exitSpotE hit goEast
;demostuff
pbExit=RPButton 592 451 31005
set pbExit "hit" leavepreviews
pbDemos=RPButton 496 451 31006
set pbDemos "hit" leavethispreview
;txtExit=RText 590 440 640 480 10 25 "Exit" 1 0 "Arial" 0
;txtDemos=RText 450 440 590 480 10 25 "Demo Menu" 1 0 "Arial" 0
;txtForward=RText 250 440 350 480 10 25 "Forward" 1 0 "Arial" 0
;txtBack=RText 180 440 250 480 10 25 "Back" 1 0 "Arial" 0
;hsExit=RHotSpot 580 440 640 480
;hsDemos=RHotSpot 450 440 580 480
;hsForward=RHotSpot 250 440 350 480
;hsBack=RHotSpot 180 440 250 480
;set hsExit "hit" killdemos
;set hsDemos "hit" killthisdemo
;set hsForward "hit" next
;set hsBack "hit" previous
;end demostuff
;tickle
gooSpot=RCHotSpot 23 453 78 476
set gooSpot zOrder gooSpotZ
set gooSpot cursor liveCursor
set gooSpot hit gooAreaClicked
; call showBackpackSpot 11 230 39 291
; call showRadioSpot 151 253 180 283
]
procedure addToPuzzle
[
;answers
bug1=RAnswer 1 0 401 112 answersZ
bug2=RAnswer 2 0 357 188 answersZ
bug3=RAnswer 3 0 461 167 answersZ
bug4=RAnswer 4 0 350 282 answersZ
bug5=RAnswer 5 0 451 261 answersZ
;container
container=RContainer 1 573 304 629 361
;puzzle graphics
bugsL=RPuzzleGraphic 1 191 282 bugsLZ false
bugR=RPuzzleGraphic 2 518 304 bugRZ false
]
procedure entrance
[
]
procedure spidersEntrance
[
;uncomment (when res available)
play spider1 setAnim spider1DescId -1 -1
play spider2 setAnim spider2DescId -1 -1
; play joni setAnim joniReact -2 -2
; play santiago setAnim santiagoReact -2 -2
spider1Desc=CharacterAction "spider1" characterAnim spider1DescId
spider2Desc=CharacterAction "spider2" characterAnim spider2DescId
; joniReact=CharacterAction "joni" characterAnim joniReactId
; santiagoReact=CharacterAction "santiago" characterAnim santiagoReactId
spidersDescSfx=SoundAction spidersDescSfxId
entryCompAct=CompositeAction
play entryCompAct add "spider1Desc"
play entryCompAct add "spider2Desc"
; play entryCompAct add "joniReact"
; play entryCompAct add "santiagoReact"
play entryCompAct add "spidersDescSfx"
play scene addToQueueBack "entryCompAct"
set scene queueFinished entrySpeech
play scene startQueue
]
procedure entrySpeech
[
if beenHere=0
[
spider1Spch1=SpeechAction "spider1" spider1IntroSpchId.1
spider2Spch1=SpeechAction "spider2" spider2IntroSpchId.1
spider1Spch2=SpeechAction "spider1" spider1IntroSpchId.2
spider2Spch2=SpeechAction "spider2" spider2IntroSpchId.2
spider2Spch3=SpeechAction "spider2" spider2IntroSpchId.3
spider2Spch4=SpeechAction "spider2" spider2IntroSpchId.4
spider2Spch5=SpeechAction "spider2" spider2IntroSpchId.5
spider2Spch6=SpeechAction "spider2" spider2IntroSpchId.6
spider1Spch3=SpeechAction "spider1" spider1IntroSpchId.3
spider2Spch7=SpeechAction "spider2" spider2IntroSpchId.7
play scene addToQueueBack "spider1Spch1"
play scene addToQueueBack "spider2Spch1"
play scene addToQueueBack "spider1Spch2"
play scene addToQueueBack "spider2Spch2"
play scene addToQueueBack "spider2Spch3"
play scene addToQueueBack "spider2Spch4"
play scene addToQueueBack "spider2Spch5"
play scene addToQueueBack "spider2Spch6"
play scene addToQueueBack "spider1Spch3"
play scene addToQueueBack "spider2Spch7"
]
else
[
spider2Spch=SpeechAction "spider2" spider2RetSpchId
play scene addToQueueBack "spider2Spch"
]
set scene queueFinished nothing
play scene startQueue
]
procedure playerWrong
[
if wrongCtr=1
spch=SpeechAction "spider2" spider2WrongSpchId
else
spch=SpeechAction "santiago" santiagoWrongSpchId
if wrongCtr=1
wrongCtr=2
else
wrongCtr=1
play scene addToQueueBack "spch"
set scene queueFinished nothing
play scene startQueue
]
procedure playerSolved
[
set scene queueInterruptible 0
set joni clicked
set santiago clicked
set spider1 clicked
set spider2 clicked
set gooSpot hit
joniClickCtr=1
santiagoClickCtr=1
spider1ClickCtr=1
spider2ClickCtr=1
helpClickCtr=1
puzzleCompleted=True
spidersDine=AnimAction spidersDineId -1 -1 spidersZ spidersDineSfxId
;hide eaten bugs
hideBugsL=HidePuzzleGraphicAction "bugsL"
hideBugR=HidePuzzleGraphicAction "bugR"
hideAnswer=HideAnswerAction
spidersCrawl=AnimAction spidersCrawlId -1 -1 spidersZ spidersCrawlSfxId
showSpider1=SettledPoseAction "spider1"
showSpider2=SettledPoseAction "spider2"
hideJoni=SetHidePoseAction "joni"
hideSantiago=SetHidePoseAction "santiago"
JSHighFive=AnimAction JSHighFiveId -1 -1 joniZ 0
play JSHighFive addFrameSound 6 JSHighFiveSfxId
showJoni=SettledPoseAction "joni"
showSantiago=SettledPoseAction "santiago"
spider2Spch1=SpeechAction "spider2" spider2SolvedSpchId.1
spider2Spch2=SpeechAction "spider2" spider2SolvedSpchId.2
spider1Spch=SpeechAction "spider1" spider1SolvedSpchId
beetleBagSplurt=AnimAction beetleBagSplurtId -1 -1 beetleBagZ beetleBagSplurtSfxId
beetleBagSparkleSfx=SoundAction beetleBagSparkleSfxId
treasure=TreasureAction beetleBagSparkleId purpleBeetleBagTool -1 -1 beetleBagZ
santiagoSpch=SpeechAction "santiago" santiagoSolvedSpchId
joniSpch=SpeechAction "joni" joniSolvedSpchId
sNIB=StartNIBAction
eNIB=EndNIBAction
play scene addToQueueBack "spidersDine"
play scene addToQueueBack "hideBugsL"
play scene addToQueueBack "hideBugR"
play scene addToQueueBack "hideAnswer"
play scene addToQueueBack "spidersCrawl"
play scene addToQueueBack "showSpider1"
play scene addToQueueBack "showSpider2"
play scene addToQueueBack "hideJoni"
play scene addToQueueBack "hideSantiago"
play scene addToQueueBack "JSHighFive"
play scene addToQueueBack "showJoni"
play scene addToQueueBack "showSantiago"
play scene addToQueueBack "spider2Spch1"
play scene addToQueueBack "spider2Spch2"
play scene addToQueueBack "spider1Spch"
play scene addToQueueBack "sNIB"
play scene addToQueueBack "beetleBagSplurt"
play scene addToQueueBack "eNIB"
; play scene addToQueueBack "treasure"
play scene addToQueueBack "beetleBagSparkleSfx"
play scene addToQueueBack "santiagoSpch"
play scene addToQueueBack "joniSpch"
play spider1 hidePose
play spider2 hidePose
; set scene queueFinished saveToolState
set scene queueFinished goEast
play scene startQueue
]
procedure gooAreaClicked
[
purpleBubble=AnimAction purpleBubbleId -1 -1 purpleBubbleZ purpleBubbleSfxId
play scene addToQueueBack "purpleBubble"
set scene queueFinished nothing
play scene startQueue
]
procedure joniClicked
[
; if puzzleCompleted=False
joniSpch=SpeechAction "joni" joniCPreSpchId.joniClickCtr
; else
; joniSpch=SpeechAction "joni" joniCPostSpchId.joniClickCtr
play scene addToQueueBack "joniSpch"
if joniClickCtr=1
joniClickCtr=2
else
joniClickCtr=1
set scene queueFinished nothing
play scene startQueue
]
procedure santiagoClicked
[
; if puzzleCompleted=False
santiagoSpch=SpeechAction "santiago" santiagoCPreSpchId.santiagoClickCtr
; else
; santiagoSpch=SpeechAction "santiago" santiagoCPostSpchId.santiagoClickCtr
play scene addToQueueBack "santiagoSpch"
if santiagoClickCtr=1
santiagoClickCtr=2
else
santiagoClickCtr=1
set scene queueFinished nothing
play scene startQueue
]
procedure spider1Clicked
[
; if puzzleCompleted=False
spider1Spch=SpeechAction "spider1" spider1CPreSpchId.spider1ClickCtr
; else
; spider1Spch=SpeechAction "spider1" spider1CPostSpchId.spider1ClickCtr
play scene addToQueueBack "spider1Spch"
if spider1ClickCtr=1
spider1ClickCtr=2
else
spider1ClickCtr=1
set scene queueFinished nothing
play scene startQueue
]
procedure spider2Clicked
[
; if puzzleCompleted=False
spider2Spch=SpeechAction "spider2" spider2CPreSpchId.spider2ClickCtr
; else
; spider2Spch=SpeechAction "spider2" spider2CPostSpchId.spider2ClickCtr
play scene addToQueueBack "spider2Spch"
if spider2ClickCtr=1
spider2ClickCtr=2
else
spider2ClickCtr=1
set scene queueFinished nothing
play scene startQueue
]
procedure goWest
[
set scene queueInterruptible 0
; loadAct=LoadResourceGroupAction exitWGroupId
;unloadAct=UnloadResourceGroupAction exitWGroupId
sNIB=StartNIBAction
eNIB=EndNIBAction
play scene addToQueueBack "sNIB"
; play scene addToQueueBack "loadAct"
call addQMoveActions joniExitWId santiagoExitWId laptrapExitWId 1
;play scene addToQueueBack "unloadAct"
play scene addToQueueBack "eNIB"
set scene queueFinished exitWest
play scene startQueue
]
procedure goEast
[
set scene queueInterruptible 0
loadAct=LoadResourceGroupAction exitEGroupId
;unloadAct=UnloadResourceGroupAction exitEGroupId
sNIB=StartNIBAction
eNIB=EndNIBAction
play scene addToQueueBack "sNIB"
play scene addToQueueBack "loadAct"
call addQMoveActions joniExitEId santiagoExitEId laptrapExitEId 1
;play scene addToQueueBack "unloadAct"
play scene addToQueueBack "eNIB"
set scene queueFinished exitEast
play scene startQueue
]
procedure saveToolState
[
get scene treasuresShowing treasuresLeft
; set worldMem intVariable treasuresLeft203 treasuresLeft
]
procedure leaving
[
play musicLoop stop
UnloadResourceGroup preloadGroupId
CloseResourceGroupFile "wscommon.grp"
CloseResourceGroupFile "ws203.grp"
CloseResourceGroupFile "help.grp"
]
procedure exitWest
[
call leaving
;Labyrinth off
relay lab1.mps
]
procedure exitEast
[
call leaving
relay lab3.mps
]
procedure exitToSignin
[
; call leaving
;
; relay "signin.mps"
]
procedure killdemos
[
quit
]
procedure killthisdemo
[
drop script stack
relay autorun.mps
]
procedure next
[
call exitEast
]
procedure previous
[
call exitWest
]
procedure leavethispreview
[
play musicLoop stop
Labyrinth off
; click=RSound 31405 -1
; play click start
; pause 1
exit
]
procedure leavepreviews
[
wp=RWorldPort
firsttime=0
set wp intVariable 1 firsttime
Labyrinth off
; click=RSound 31405 -1
; play click start
; pause 1
quit
]