home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Treasure Mathstorm
/
TMSWINCD.ISO
/
pc
/
install
/
lab1.mps
< prev
next >
Wrap
Text File
|
1996-10-14
|
15KB
|
679 lines
;ws107a.mps
;mods for labdemo by Andy Wally 10/97
;debug on
Labyrinth on
yield off
;consts
;settled
joniSetId=4902
santiagoSetId=4903
laptrapSetId=4954
sentinelSetId=4905
;bod
joniLipsId=4906
santiagoLipsId=4907
sentinelLipsId=4909
joniArmsId=4919
santiagoArmsId=4920
joniBodId=4946
santiagoBodId=4947
;fidgets
joniFidgetsId=[4910 4911 4912
santiagoFidgetsId=[4913 4914 4915
;exit/enter
joniEnterWId=4955
santiagoEnterWId=4957
laptrapEnterWId=4956
joniExitWId=4925
santiagoExitWId=4926
laptrapExitWId=4927
joniExitEId=4928
santiagoExitEId=4929
laptrapExitEId=4930
;speech
joniCPreSpchId=[5123 5124
joniCPostSpchId=[5125 5126
joniSolvedSpchId=5122
santiagoCPreSpchId=[5127 5128
santiagoCPostSpchId=[5129 5130
santiagoWrongSpchId=[5118 5120
santiagoSolvedSpchId=5121
sentinelCPreASpchId=[5100 5136
sentinelCPreBSpchId=5101
sentinelCPostSpchId=[5131 5132
sentinelRetSpchId=[5133 5134 5135
owenL1ASpchId=5103
owenL1BSpchId=[5107 5108 5109
owenL234SpchId=5103
owenPostSpchId=5139
leslieL1SpchId=[5104 5105 5106
leslieL2SpchId=[5110 5111 5112
leslieL3SpchId=[5114 5115 5116
leslieL4SpchId=[5137 5138
lesliePostSpchId=5140
radioLightId=4922
backpackLightId=4923
laptrapLightId=4924
bridgeUpId=4952
bridgeLevelsId=4940
bridgeDownId=4953
snakesLId=4931
snakesRId=4939
;sfx
snakesHissSfxId=4920
snakeHissSfxId=4921
bridgeLevelsSfxId=4922
joniCrossesSfxId=4926
santiagoCrossesSfxId=4927
answerSnapSfxId=4924
answerGoHomeSfxId=4925
answerPickUpSfxId=4923
backpackSfxId=4928
backgroundId=4900
;initial opened pouch
whichPouch=0
;groups
preloadGroupId=4900
enterWGroupId=4910
exitWGroupId=4920
exitEGroupId=4921
rewardGroupId=4930
;z values
exitSpotZ=2
sentinelZ=4
sentinelSpotZ=6
bridgeZ=8
puzzleTextZ=10
santiagoZ=20
joniZ=22
laptrapZ=24
rocksZ=[30 32 34 36
snakesRZ=40
snakesLZ=42
radioSpotZ=60
backpackSpotZ=62
toolkitZ=80
;//////////////////////////////
include com.mps
;xtra line
include data107a.mps
;xtra line
;include help.mps
;//////////////////////////////
;global access
;worldMem=RWorldPort
;get worldMem priorScene prior
;set worldMem priorScene backgroundId
;get worldMem puzzleLevel math level
;get worldMem intVariable been107 beenHere
;if beenHere=0
; set worldMem intVariable been107 1
level=2
beenHere=0
joniClickCtr=1
santiagoClickCtr=1
sentinelClickCtr=1
helpClickCtr=1
wrongCtr=1
puzzleCompleted=False
UseResourceGroupFile "wscommon.grp"
UseResourceGroupFile "ws107a.grp"
UseResourceGroupFile "ws107aP.grp"
UseResourceGroupFile "help.grp"
call init
yield on
;///////////////////////////////
procedure init
[
LoadResourceGroup preloadGroupId
musicLoop=RBackgroundSound loopAMusicId
scene=RScene backgroundId
play scene setScreenCursor deadCursor
set scene laptrapClosed laptrapDone
set scene goToSignin exitToSignin
play scene enableAsynchronousResourceLoading
play scene start
joni=RCharacter joniSetId -1 -1 joniZ
santiago=RCharacter santiagoSetId -1 -1 santiagoZ
laptrap=RCharacter laptrapSetId -1 -1 laptrapZ
sentinel=RCharacter sentinelSetId -1 -1 sentinelZ
call initChars
play sentinel showPose
fidgetManager=FidgetManager
call initFidgetManager
play fidgetManager start
snakesL=RAmbientAnim snakesLId -1 -1 snakesLZ 0 0
snakesR=RAmbientAnim snakesRId -1 -1 snakesRZ 0 0
play snakesL start
play snakesR start
snakesHissSfx=RSound snakesHissSfxId 0
bridgeUp=RAnimation bridgeUpId -1 -1 bridgeZ
play bridgeUp show
puzzle=RPuzzle
call initPuzzleC
set puzzle scrambleAnswers true
set puzzle centerPuzzleText true
play puzzle setPuzzleTextFont trueType ACaslon "Acasb___" 16 10
play puzzle start
call createHotSpots
;do this after the backpack hotspot is set up
; call setupBackpack
; CacheFile "ws119P.grp"
; CacheFile "ws203P.grp"
;intro
if beenHere=0
[
play joni showPose
play santiago showPose
play laptrap showPose
movieAct=MovieAction "mv107a.smk" 0 0 500000
play scene addToQueueBack "movieAct"
set scene queueFinished movieDone
play scene startQueue
]
]
procedure movieDone
[
play musicLoop start
play snakesHissSfx start
]
procedure initChars
[
;add anims
call addAnimsJoniC
call addAnimsSantiagoC
call addAnimsLaptrapC
play sentinel setHead sentinelLipsId -1 -1
;set clicks
call setCharClicksC
;set cursors
call setCharCursorsC
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
play fidgetManager add "joniFidg1" 10
play fidgetManager add "santiagoFidg1" 10
play fidgetManager add "joniFidg2" 10
play fidgetManager add "santiagoFidg2" 10
play fidgetManager add "joniFidg3" 10
play fidgetManager add "santiagoFidg3" 10
]
procedure createHotSpots
[
; ;navigation
; exitSpotW=RCHotSpot 0 121 83 335
; set exitSpotW zOrder exitSpotZ
; set exitSpotW cursor westCursor
; set exitSpotW hit goWest
; exitSpotE2=RCHotSpot 546 106 639 209
; set exitSpotE2 zOrder exitSpotZ
; set exitSpotE2 cursor eastCursor
; set exitSpotE2 hit exitEast
;demostuff
pbExit=RPButton 600 450 31005
set pbExit "hit" leavepreviews
pbDemos=RPButton 500 450 31006
set pbDemos "hit" leavethispreview
;txtExit=RText 590 440 640 480 11 25 "Exit" 1 0 "Arial" 0
;txtDemos=RText 500 400 640 440 11 25 "Demo Menu" 1 0 "Arial" 0
;txtForward=RText 550 400 640 440 10 25 "Forward" 1 0 "Arial" 0
;txtBack=RText 480 400 550 440 10 25 "Back" 1 0 "Arial" 0
;hsExit=RHotSpot 580 440 640 480
;hsDemos=RHotSpot 500 400 640 440
;hsForward=RHotSpot 550 400 640 440
;hsBack=RHotSpot 480 400 550 440
;set hsExit "hit" killdemos
;set hsDemos "hit" killthisdemo
;set hsForward "hit" next
;set hsBack "hit" previous
;end demostuff
;(sentinel set too small)
sentinelSpot=RCHotSpot 249 365 382 479
set sentinelSpot zOrder sentinelSpotZ
set sentinelSpot cursor liveCursor
set sentinelSpot hit sentinelClicked
; call showBackpackSpot 86 221 115 269
; call showRadioSpot 166 234 198 264
]
procedure addToPuzzle
[
;answers
rockPair1=RAnswer 1 0 5 319 rocksZ.1
rockPair2=RAnswer 2 0 1 367 rocksZ.3
rockPair3=RAnswer 3 0 105 344 rocksZ.2
rockPair4=RAnswer 4 0 52 400 rocksZ.4
;containers
container=RContainer 1 244 243 305 302
;puzzle text
pText=RPuzzleText 1 381 344 445 368 puzzleTextZ false
]
procedure entrance
[
play joni hidePose
play santiago hidePose
play laptrap hidePose
loadAct=LoadResourceGroupAction enterWGroupId
unloadAct=UnloadResourceGroupAction enterWGroupId
sNIB=StartNIBAction
eNIB=EndNIBAction
play scene addToQueueBack "sNIB"
play scene addToQueueBack "loadAct"
call addQMoveActions joniEnterWId santiagoEnterWId laptrapEnterWId 0
play scene addToQueueBack "unloadAct"
play scene addToQueueBack "eNIB"
set scene queueFinished entrySpeech
play scene startQueue
]
procedure entrySpeech
[
sentinelSpch1=SpeechAction "sentinel" sentinelRetSpchId.1
sentinelSpch2=SpeechAction "sentinel" sentinelRetSpchId.2
sentinelSpch3=SpeechAction "sentinel" sentinelRetSpchId.3
play scene addToQueueBack "sentinelSpch1"
play scene addToQueueBack "sentinelSpch2"
play scene addToQueueBack "sentinelSpch3"
set scene queueFinished nothing
play scene startQueue
]
procedure playerWrong
[
spch=SpeechAction "santiago" santiagoWrongSpchId.wrongCtr
if wrongCtr=1
wrongCtr=2
else
wrongCtr=1
play scene addToQueueBack "spch"
set scene queueFinished nothing
play scene startQueue
]
procedure playerSolved
[
set joni clicked
set santiago clicked
set sentinel clicked
joniClickCtr=1
santiagoClickCtr=1
sentinelClickCtr=1
helpClickCtr=1
puzzleCompleted=True
set scene queueInterruptible 0
loadGrpAct=LoadResourceGroupAction rewardGroupId
loadResAct=LoadResourceAction "ASEQ" bridgeDownId
sNIB=StartNIBAction
eNIB=EndNIBAction
play scene addToQueueBack "sNIB"
play scene addToQueueBack "loadGrpAct"
play scene addToQueueBack "loadResAct"
play scene addToQueueBack "eNIB"
set scene queueFinished rewardResLoaded
play scene startQueue
]
procedure rewardResLoaded
[
set scene queueInterruptible 0
drop bridgeUp
bridgeDown=RAnimation bridgeDownId -1 -1 bridgeZ
hideRock=HideAnswerAction
hidePuzzleText=HidePuzzleTextAction
bridgeLevels=AnimAction bridgeLevelsId -1 -1 bridgeZ bridgeLevelsSfxId
showLeveledBridge=ShowAnimAction "bridgeDown"
unloadGrpAct=UnloadResourceGroupAction rewardGroupId
play scene addToQueueBack "hideRock"
play scene addToQueueBack "hidePuzzleText"
play scene addToQueueBack "bridgeLevels"
play scene addToQueueBack "showLeveledBridge"
play scene addToQueueBack "unloadGrpAct"
set scene queueFinished bridgeLeveled
play scene startQueue
]
procedure bridgeLeveled
[
set scene queueInterruptible 0
;player can now advance
exitSpotE=RCHotSpot 546 246 639 399
; set exitSpotE zOrder exitSpotZ
; set exitSpotE cursor eastCursor
; set exitSpotE hit goEast
; set exitSpotE2 hit goEast
santiagoSpch=SpeechAction "santiago" santiagoSolvedSpchId
joniSpch=SpeechAction "joni" joniSolvedSpchId
play scene addToQueueBack "santiagoSpch"
play scene addToQueueBack "joniSpch"
set scene queueFinished goEast
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 sentinelClicked
[
if puzzleCompleted=False
[
snakeHissSfx=SoundAction snakeHissSfxId
if sentinelClickCtr=1
[
sentinelSpch1=SpeechAction "sentinel" sentinelCPreASpchId.1
sentinelSpch2=SpeechAction "sentinel" sentinelCPreASpchId.2
play scene addToQueueBack "sentinelSpch1"
play scene addToQueueBack "sentinelSpch2"
play scene addToQueueBack "snakeHissSfx"
]
else
[
sentinelSpch=SpeechAction "sentinel" sentinelCPreBSpchId
play scene addToQueueBack "sentinelSpch"
play scene addToQueueBack "snakeHissSfx"
]
]
; else
; [
; sentinelSpch=SpeechAction "sentinel" sentinelCPostSpchId.sentinelClickCtr
;
; play scene addToQueueBack "sentinelSpch"
; ]
if sentinelClickCtr=1
sentinelClickCtr=2
else
sentinelClickCtr=1
set scene queueFinished nothing
play scene startQueue
]
procedure addQHelpTalk
[
]
procedure goWest
[
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
play musicLoop pause
play joni setAnim joniExitEId -1 -1
play joni hideSettled joniExitEId true
play santiago setAnim santiagoExitEId -1 -1
play santiago hideSettled santiagoExitEId true
play laptrap setAnim laptrapExitEId -1 -1
play laptrap hideSettled laptrapExitEId true
loadAct=LoadResourceGroupAction exitEGroupId
;unloadAct=UnloadResourceGroupAction exitEGroupId
joniCrosses=CharacterAction "joni" characterAnim joniExitEId
santiagoCrosses=CharacterAction "santiago" characterAnim santiagoExitEId
laptrapCrosses=CharacterAction "laptrap" characterAnim laptrapExitEId
joniCrossesSfx=SoundAction joniCrossesSfxId
santiagoCrossesSfx=SoundAction santiagoCrossesSfxId
sNIB=StartNIBAction
eNIB=EndNIBAction
grp1CrossesCAct=CompositeAction
play grp1CrossesCAct add "santiagoCrosses"
play grp1CrossesCAct add "santiagoCrossesSfx"
grp2CrossesCAct=CompositeAction
play grp2CrossesCAct add "joniCrosses"
play grp2CrossesCAct add "joniCrossesSfx"
play grp2CrossesCAct add "laptrapCrosses"
play scene addToQueueBack "sNIB"
play scene addToQueueBack "loadAct"
play scene addToQueueBack "grp1CrossesCAct"
play scene addToQueueBack "grp2CrossesCAct"
;play scene addToQueueBack "unloadAct"
play scene addToQueueBack "eNIB"
set scene queueFinished exitEast
play scene startQueue
]
procedure leaving
[
play musicLoop stop
UnloadResourceGroup preloadGroupId
CloseResourceGroupFile "wscommon.grp"
CloseResourceGroupFile "ws107a.grp"
CloseResourceGroupFile "ws107aP.grp"
CloseResourceGroupFile "help.grp"
]
procedure exitWest
[
call leaving
; UncacheFile "ws107aP.grp"
; relay "ws105.mps"
Labyrinth off
relay labrnth1.mps
]
procedure exitEast
[
play musicLoop resume
call leaving
; UncacheFile "ws105P.grp"
; uncache this one, since a return will be thru 107b
; UncacheFile "ws107aP.grp"
; relay "ws119.mps"
relay lab2.mps
]
procedure exitToSignin
[
; call leaving
;
; UncacheFile "ws105P.grp"
; UncacheFile "ws107aP.grp"
; UncacheFile "ws119P.grp"
;
; 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
]