home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
A Field Trip to the Sky (Demo)
/
Mac_Sunburst_AFieldTripToTheSky-Demo.iso
/
DIR
/
GAME.DIR
/
00101_Script_Start-Stop
< prev
next >
Wrap
Text File
|
1996-03-27
|
1KB
|
95 lines
global gGameFrame, gAudPath, gStartGame
-- ïï startMovie ïï
on startMovie
set gStartGame to TRUE
end
-- ïï
on doGameSetup
global gVol
if gStartGame then
if( gGameFrame = 0 ) then
gameReset()
else
restoreState()
end if
set gAudPath to gVol & "GAME:AUDIO:"
set gStartGame to FALSE
end if
end
-- ïï stopMovie ïï
-- kill all the puppeting
on stopMovie
repeat with i = 1 to 48
puppetSprite i, FALSE
end repeat
end
-- ïï idle ïï
-- animate everybody, and check for return to ss
on idle
global gGoingToTerms, gGoingBackToSS
if the frame > 1 then
-- flush out some clicks?
doFlush()
doAnimate()
if gGoingToTerms = TRUE then
prepareGameChild()
end if
if gGoingBackToSS then
set gGameFrame to 0
end if
doCheckForGoBackToSS()
repeat while soundBusy(2)
if the mouseDown then
sound stop 2
exit repeat
else
doAnimate()
end if
end repeat
end if
end
-- ïï prepareGameChild ïï
-- prepare to go to a child movie with a different palette
on prepareGameChild
global gGoingToTerms
-- save the state
gameSave()
-- kill the puppets
repeat with i = 1 to 48
puppetSprite i, FALSE
end repeat
if gGoingToTerms = FALSE then
chooseAlbum()
end if
end