home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gizmos & Gadgets
/
SSGWINCD.ISO
/
pc
/
install
/
lab3.mps
< prev
next >
Wrap
Text File
|
1996-10-14
|
19KB
|
844 lines
;ws109.mps
;mods for labdemo by Andy Wally 10/97
Labyrinth on
yield off
;consts
;settled
joniSetId=6102
santiagoSetId=6103
laptrapSetId=6163
monkeySetId=6105
;bod
joniLipsId=6106
santiagoLipsId=6107
monkeyLipsId=6109
joniArmsId=6158
santiagoArmsId=6159
monkeyArmsId=6161
joniBodId=6152
santiagoBodId=6153
monkeyBodId=6155
;fidgets
joniFidgetsId=[6110 6111 6112
santiagoFidgetsId=[6113 6114 6115
monkeyFidgetsId=[6119 6120
;exit/enter
joniEnterWId=6125
santiagoEnterWId=6126
laptrapEnterWId=6127
joniEnterEId=6128
santiagoEnterEId=6129
laptrapEnterEId=6130
joniExitWId=6131
santiagoExitWId=6132
laptrapExitWId=6133
joniExitEId=6134
santiagoExitEId=6135
laptrapExitEId=6136
;speech
joniCPreSpchId=[6339 6340
joniCPostSpchId=[6341 6342
joniSolvedSpchId=6338
santiagoCPreSpchId=[6343 6344
santiagoCPostSpchId=[6345 6346
santiagoWrongSpchId=6334
santiagoSolvedSpchId=6337
monkeyCPreSpchId=[6305 6306
monkeyCPostSpchId=[6347 6348
monkeyIntroSpchId=[6300 6301 6302
monkeyRetSpchId=[6303 6304
monkeyWrongSpchId=6332
monkeySolvedSpchId=[6335 6336
owenL1SpchId=6309
owenL2SpchId=6312
owenL3SpchId=6316
owenL4SpchId=6319
owenPostSpchId=6331
leslieL1SpchId=[6310 6311
leslieL2SpchId=[6313 6314 6315
leslieL3ASpchId=6317
leslieL3BSpchId=6318
leslieL4SpchId=[6320 6321 6322
lesliePostSpchId=[6328 6329
monkeyPolishId=6138
laptrapHideId=6167
radioLightId=6122
backpackLightId=6123
laptrapLightId=6124
plateId=6139
grooveId=6166
glintId=6137
plateShineId=6147
JSDuckId=6164
bushSneezeId=6148
branchGlowId=6149
bushHalfSneezeId=6168
;sfx
glintSfxId=6120
monkeyPolishSfxId=6121
plateShineSfxId=6126
mathraSfxId=[6122 6130 6131
bushSneezeSfxId=6127
branchGlowSfxId=6128
bushHalfSneezeSfxId=6132
answerSnapSfxId=6124
answerGoHomeSfxId=6125
answerPickUpSfxId=6123
backpackSfxId=6129
backgroundId=6100
;ws105
WSceneId=4200
;ws111
ESceneId=6600
;tool placement
whichPouch=0
;coords
plateX=[233 293 359 410 438
plateY=[364 378 361 389 360
;varies with level
grooveX=[332 353 332 332
grooveY=[228 228 228 216
plateWidth=54
plateHeight=26
;groups
preloadGroupId=6100
enterWGroupId=6110
enterEGroupId=6111
exitWGroupId=6120
exitEGroupId=6121
monkeyPolishGroupId=6130
;mathraScareGroupId=6140
rewardGroupId=6150
;z values
exitSpotZ=2
mathraSpotZ=4
grooveZ=6
puzzleTextZ=8
platesZ=10
plateShineZ=12
glintZ=14
monkeyZ=16
bushZ=18
branchZ=20
santiagoZ=30
joniZ=32
laptrapZ=34
radioSpotZ=60
backpackSpotZ=62
toolkitZ=80
;//////////////////////////////
include com.mps
;xtra line
include data109.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 been109 beenHere
;if beenHere=0
; set worldMem intVariable been109 1
level=1
beenHere=0
prior=0
joniClickCtr=1
santiagoClickCtr=1
monkeyClickCtr=1
helpClickCtr=1
mathraSpotClickCtr=1
wrongCtr=1
puzzleCompleted=False
UseResourceGroupFile "wscommon.grp"
UseResourceGroupFile "ws109.grp"
UseResourceGroupFile "ws109P.grp"
UseResourceGroupFile "help.grp"
call init
;CacheFile "ws111P.grp"
;CacheFile "ws105P.grp"
yield on
;///////////////////////////////
procedure init
[
LoadResourceGroup preloadGroupId
musicLoop=RBackgroundSound loopAMusicId
play musicLoop start
scene=RScene backgroundId
play scene setScreenCursor deadCursor
set scene laptrapClosed laptrapDone
set scene goToSignin exitToSignin
set scene toolTaken saveToolState
;play scene enableAsynchronousResourceLoading
play scene start
; get worldMem intVariable treasuresLeft109 treasuresLeft
; if treasuresLeft
; play scene dropTreasure branchGlowId blueSneezeberryTool -1 -1 branchZ treasuresLeft
joni=RCharacter joniSetId -1 -1 joniZ
santiago=RCharacter santiagoSetId -1 -1 santiagoZ
laptrap=RCharacter laptrapSetId -1 -1 laptrapZ
monkey=RCharacter monkeySetId -1 -1 monkeyZ
call initChars
play monkey showPose
fidgetManager=FidgetManager
call initFidgetManager
play fidgetManager start
glint=RAmbientAnim glintId -1 -1 glintZ 30 glintSfxId
play glint start
bushHalfSneeze=RAnimation bushHalfSneezeId -1 -1 bushZ
set bushHalfSneeze cursor liveCursor
set bushHalfSneeze clicked bushClicked
play bushHalfSneeze show
groove=RAnimation grooveId grooveX.level grooveY.level grooveZ
play groove show
puzzle=RPuzzle
call initPuzzleC
set puzzle scrambleAnswers true
set puzzle centerAnswerText true
set puzzle centerPuzzleText true
play puzzle setAnswerFont trueType CaslonLightSSK "Casll___" 20 10
play puzzle setPuzzleTextFont trueType CaslonLightSSK "Casll___" 20 10
play puzzle start
call createHotSpots
;do this after the backpack hotspot is set up
; call setupBackpack
;intro
if prior=0
[
play joni showPose
play santiago showPose
play laptrap showPose
call entrySpeech
]
else
call entrance
]
procedure initChars
[
;add anims
call addAnimsJoniC
call addAnimsSantiagoC
call addAnimsLaptrapC
play laptrap setAnim laptrapHideId -2 -2
;monkey
play monkey setHead monkeyLipsId -1 -1
play monkey setArms monkeyArmsId -1 -1
play monkey setBody monkeyBodId -1 -1
play monkey setAnim monkeyFidgetsId.1 -2 -2
play monkey setAnim monkeyFidgetsId.2 -2 -2
;set clicks
call setCharClicksC
set monkey clicked monkeyClicked
;set cursors
call setCharCursorsC
set monkey 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
monkeyFidg1=CharacterAction "monkey" fidgetAnim monkeyFidgetsId.1
monkeyFidg2=CharacterAction "monkey" fidgetAnim monkeyFidgetsId.2
monkeyFidg3=CharacterAction "monkey" fidgetAnim monkeyFidgetsId.2
play fidgetManager add "joniFidg1" 10
play fidgetManager add "santiagoFidg1" 10
play fidgetManager add "monkeyFidg1" 10
play fidgetManager add "joniFidg2" 10
play fidgetManager add "santiagoFidg2" 10
play fidgetManager add "monkeyFidg2" 10
play fidgetManager add "joniFidg3" 10
play fidgetManager add "santiagoFidg3" 10
play fidgetManager add "monkeyFidg3" 10
]
procedure createHotSpots
[
;navigation
; exitSpotW=RCHotSpot 0 193 116 479
; set exitSpotW zOrder exitSpotZ
; set exitSpotW cursor westCursor
; set exitSpotW hit goWest
; exitSpotE=RCHotSpot 524 193 639 439
; set exitSpotE zOrder exitSpotZ
; set exitSpotE cursor eastCursor
; set exitSpotE hit goEast
;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 450 440 590 480 11 25 "Demo Menu" 1 0 "Arial" 0
;txtForward=RText 250 440 350 480 11 25 "Forward" 1 0 "Arial" 0
;txtBack=RText 180 440 250 480 11 25 "Back" 1 0 "Arial" 0
;hsExit=RHotSpot 590 440 640 480
;hsDemos=RHotSpot 450 440 590 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
; mathraSpot=RCHotSpot 0 0 123 40
; set mathraSpot cursor liveCursor
; set mathraSpot zOrder mathraSpotZ
; set mathraSpot hit mathraSpotClicked
; call showBackpackSpot 43 247 78 312
; call showRadioSpot 186 263 225 304
]
procedure addToPuzzle
[
;answers
for i 1 5
[
plates.i=RAnswer i plateId plateX.i plateY.i platesZ
;shift rect up 3
set plates.i textRect plateX.i plateY.i-3 plateX.i+plateWidth plateY.i+plateHeight-3
]
;container
container=RContainer 1 grooveX.level grooveY.level grooveX.level+plateWidth grooveY.level+plateHeight
;puzzle text
call addPuzzleText
]
procedure addPuzzleText
[
if (level=1)+(level=3)
[
X1=278
X2=482
Y1=100
tRectHeight=21
space=tRectHeight-7
for i 1 4
[
Y2=Y1+tRectHeight
pText.i=RPuzzleText i X1 Y1 X2 Y2 puzzleTextZ false
Y1=Y2
]
Y1=Y1+space
pText.5=RPuzzleText 5 X1 Y1 X2 Y1+tRectHeight puzzleTextZ false
;("years" text next to groove)
pText.6=RPuzzleText 6 387 223 441 249 puzzleTextZ false
]
else
[
if (level=2)
[
X1=278
X2=482
Y1=100
tRectHeight=21
space=tRectHeight-7
for i 1 3
[
Y2=Y1+tRectHeight
pText.i=RPuzzleText i X1 Y1 X2 Y2 puzzleTextZ false
Y1=Y2
]
;space
Y1=Y1+space
for i 4 5
[
Y2=Y1+tRectHeight
pText.i=RPuzzleText i X1 Y1 X2 Y2 puzzleTextZ false
Y1=Y2
]
]
else
[
X1=278
X2=482
Y1=108
tRectHeight=21
space=tRectHeight-7
for i 1 3
[
Y2=Y1+tRectHeight
pText.i=RPuzzleText i X1 Y1 X2 Y2 puzzleTextZ false
Y1=Y2
]
;space
Y1=Y1+space
pText.4=RPuzzleText 4 X1 Y1 X2 Y1+tRectHeight puzzleTextZ false
;("years" text next to groove)
pText.5=RPuzzleText 5 387 211 441 237 puzzleTextZ false
]
]
]
procedure entrance
[
play joni hidePose
play santiago hidePose
play laptrap hidePose
sNIB=StartNIBAction
eNIB=EndNIBAction
play scene addToQueueBack "sNIB"
if prior=WSceneId
[
loadAct=LoadResourceGroupAction enterWGroupId
play scene addToQueueBack "loadAct"
call addQMoveActions joniEnterWId santiagoEnterWId laptrapEnterWId 0
unloadAct=UnloadResourceGroupAction enterWGroupId
play scene addToQueueBack "unloadAct"
]
else
[
loadAct=LoadResourceGroupAction enterEGroupId
play scene addToQueueBack "loadAct"
call addQMoveActions joniEnterEId santiagoEnterEId laptrapEnterEId 0
unloadAct=UnloadResourceGroupAction enterEGroupId
play scene addToQueueBack "unloadAct"
]
play scene addToQueueBack "eNIB"
set scene queueFinished monkeyIntro
play scene startQueue
]
procedure monkeyIntro
[
play monkey setAnim monkeyPolishId -1 -1
loadAct=LoadResourceGroupAction monkeyPolishGroupId
unloadAct=UnloadResourceGroupAction monkeyPolishGroupId
monkeyPolish=CharacterAction "monkey" characterAnim monkeyPolishId
monkeyPolishSfx=SoundAction monkeyPolishSfxId
monkeyPolishCAct=CompositeAction
play monkeyPolishCAct add "monkeyPolish"
play monkeyPolishCAct add "monkeyPolishSfx"
play scene addToQueueBack "loadAct"
play scene addToQueueBack "monkeyPolishCAct"
play scene addToQueueBack "unloadAct"
set scene queueFinished entrySpeech
play scene startQueue
]
procedure entrySpeech
[
if beenHere=0
[
monkeySpch1=SpeechAction "monkey" monkeyIntroSpchId.1
monkeySpch2=SpeechAction "monkey" monkeyIntroSpchId.2
monkeySpch3=SpeechAction "monkey" monkeyIntroSpchId.3
play scene addToQueueBack "monkeySpch1"
play scene addToQueueBack "monkeySpch2"
play scene addToQueueBack "monkeySpch3"
]
else
[
monkeySpch1=SpeechAction "monkey" monkeyRetSpchId.1
monkeySpch2=SpeechAction "monkey" monkeyRetSpchId.2
play scene addToQueueBack "monkeySpch1"
play scene addToQueueBack "monkeySpch2"
]
set scene queueFinished nothing
play scene startQueue
]
procedure mathraSpotClicked
[
;loadGrpAct=LoadResourceGroupAction mathraScareGroupId
;unloadGrpAct=UnloadResourceGroupAction mathraScareGroupId
;loadResAct=LoadResourceAction "WAVE" mathraSfxId.mathraSpotClickCtr
hideJoni=SetHidePoseAction "joni"
hideSantiago=SetHidePoseAction "santiago"
JSDuck=AnimAction JSDuckId -1 -1 joniZ mathraSfxId.mathraSpotClickCtr
showJoni=SettledPoseAction "joni"
showSantiago=SettledPoseAction "santiago"
laptrapHide=CharacterAction "laptrap" characterAnim laptrapHideId
JSDuckQ=ActionQueue
play JSDuckQ addToBack "hideJoni"
play JSDuckQ addToBack "hideSantiago"
play JSDuckQ addToBack "JSDuck"
play JSDuckQ addToBack "showJoni"
play JSDuckQ addToBack "showSantiago"
JSDuckCAct=CompositeAction
play JSDuckCAct add "JSDuckQ"
play JSDuckCAct add "laptrapHide"
;play scene addToQueueBack "loadGrpAct"
;play scene addToQueueBack "loadResAct"
play scene addToQueueBack "JSDuckCAct"
;play scene addToQueueBack "unloadGrpAct"
if mathraSpotClickCtr=3
mathraSpotClickCtr=1
else
mathraSpotClickCtr=mathraSpotClickCtr+1
set scene queueFinished nothing
play scene startQueue
]
procedure bushClicked
[
halfSneezeAct=PlayAnimAction "bushHalfSneeze" bushHalfSneezeSfxId 0
play scene addToQueueBack "halfSneezeAct"
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 monkeyClicked
[
; if puzzleCompleted=False
monkeySpch=SpeechAction "monkey" monkeyCPreSpchId.monkeyClickCtr
; else
; monkeySpch=SpeechAction "monkey" monkeyCPostSpchId.monkeyClickCtr
play scene addToQueueBack "monkeySpch"
if monkeyClickCtr=1
monkeyClickCtr=2
else
monkeyClickCtr=1
set scene queueFinished nothing
play scene startQueue
]
procedure playerWrong
[
if wrongCtr=1
spch=SpeechAction "monkey" monkeyWrongSpchId
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 monkey clicked
set bushHalfSneeze clicked
joniClickCtr=1
santiagoClickCtr=1
monkeyClickCtr=1
helpClickCtr=1
puzzleCompleted=True
loadGrpAct=LoadResourceGroupAction rewardGroupId
unloadGrpAct=UnloadResourceGroupAction rewardGroupId
loadResAct=LoadResourceAction "ASEQ" branchGlowId
monkeySpch1=SpeechAction "monkey" monkeySolvedSpchId.1
plateShine=AnimAction plateShineId grooveX.level grooveY.level plateShineZ plateShineSfxId
monkeySpch2=SpeechAction "monkey" monkeySolvedSpchId.2
hideBush=HideAnimAction "bushHalfSneeze"
bushSneeze=AnimAction bushSneezeId -1 -1 bushZ bushSneezeSfxId
showBush=ShowAnimAction "bushHalfSneeze"
branchGlowSfx=SoundAction branchGlowSfxId
; treasure=TreasureAction branchGlowId blueSneezeberryTool -1 -1 branchZ
santiagoSpch=SpeechAction "santiago" santiagoSolvedSpchId
joniSpch=SpeechAction "joni" joniSolvedSpchId
sNIB=StartNIBAction
eNIB=EndNIBAction
sNIB2=StartNIBAction
eNIB2=EndNIBAction
play scene addToQueueBack "sNIB"
play scene addToQueueBack "loadGrpAct"
play scene addToQueueBack "loadResAct"
play scene addToQueueBack "eNIB"
play scene addToQueueBack "monkeySpch1"
play scene addToQueueBack "plateShine"
play scene addToQueueBack "monkeySpch2"
play scene addToQueueBack "sNIB2"
play scene addToQueueBack "hideBush"
play scene addToQueueBack "bushSneeze"
play scene addToQueueBack "showBush"
play scene addToQueueBack "eNIB2"
; play scene addToQueueBack "treasure"
play scene addToQueueBack "branchGlowSfx"
play scene addToQueueBack "santiagoSpch"
play scene addToQueueBack "joniSpch"
play scene addToQueueback "unloadGrpAct"
; set scene queueFinished saveToolState
set scene queueFinished goEast
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 treasuresLeft109 treasuresLeft
]
procedure leaving
[
play musicLoop stop
;UnloadResourceGroup preloadGroupId
CloseResourceGroupFile "wscommon.grp"
CloseResourceGroupFile "ws109.grp"
CloseResourceGroupFile "ws109P.grp"
CloseResourceGroupFile "help.grp"
]
procedure exitWest
[
call leaving
; UncacheFile "ws203P.grp"
; UncacheFile "ws109P.grp"
Labyrinth off
relay lab2.mps
]
procedure exitEast
[
call leaving
; UncacheFile "ws203P.grp"
; UncacheFile "ws109P.grp"
Labyrinth off
relay labrnth2.mps
]
procedure exitToSignin
[
; call leaving
;
; UncacheFile "ws105P.grp"
; UncacheFile "ws111P.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
[
play musicLoop stop
wp=WorldPort
firsttime=1
set wp intVariable 1 firsttime
Labyrinth off
; click=RSound 31405 -1
; play click start
; pause 1
quit
]