home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
A Field Trip to the Sky (Demo)
/
Mac_Sunburst_AFieldTripToTheSky-Demo.iso
/
DIR
/
GAME.DIR
/
00113_Script_doSurfaceTemp
< prev
next >
Wrap
Text File
|
1996-03-27
|
2KB
|
74 lines
global gAttrList
global gTempList, gTemp
global gPower
on mouseDown
if( doButtonPress() ) then
if( gTemp <> 0 OR gPower < 17 ) then
-- if they've already been here or have enough, tell em what for
set theTemp to getProp(gAttrList,#surfaceTemp)
-- play the sound
doPlaySound( "ST" & string(theTemp + 200) )
else if gPower >= 17 then
-- else bark
doPlaySound( "Power3" )
end if
if( gTemp = 0 AND gPower < 17) then
-- set up the list to be animated
-- 312 is start, 349 is -200, 414 is 0, 473 is +200, 514 is end
if( theTemp = -200 ) then
set theEndPoint to 349
set m to 15
else if ( theTemp = 200 ) then
set theEndPoint to 473
set m to 20
else
set theEndPoint to 414
set m to 18
end if
-- set up the start of the animation
set gTempList to []
set theStart to 312
set theEnd to 514
-- add the first part
repeat with i = 0 to (theEnd - theStart)/20 - 1
add gTempList, theStart + i*m
end repeat
-- sink back down to the right level
set i to getAt(gTempList,count(gTempList))
repeat while i > theEndPoint
add( gTempList, i )
set i to i - 14
end repeat
-- finally, add in the flutter
add gTempList, theEndPoint - 4
add gTempList, theEndPoint - 2
add gTempList, theEndPoint
add gTempList, theEndPoint + 3
add gTempList, theEndPoint + 1
add gTempList, theEndPoint - 1
-- set up the pointer to that list
set gTemp to 1
decreasePower(2)
updateStage
end if
doFlush()
end if
end