home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
A Field Trip to the Sky (Demo)
/
Mac_Sunburst_AFieldTripToTheSky-Demo.iso
/
DIR
/
GAME.DIR
/
00116_Script_doMoon
< prev
next >
Wrap
Text File
|
1996-03-27
|
2KB
|
64 lines
global gAttrList
global gMoons, gMoonsClicked
global gPower
on mouseDown
set s to the clickOn
set c to the castNum of sprite s
if( gMoonsClicked <> 0 OR gPower < 17 ) then
-- if they've already been here or have enough, tell em what for
set theMoons to getProp(gAttrList,#moons)
-- play the sound
doPlaySound( "MO" & string(theMoons) )
else if gPower >= 17 then
-- else bark
doPlaySound( "Power3" )
end if
if gMoonsClicked = 0 AND gPower < 17 then
if( doSwitch(the clickOn) ) then
set s to 16
puppetSprite s, TRUE
set c to the number of cast (string(theMoons) && "Moon")
if theMoons = 1 then
set gMoons to random(9)
set the castNum of sprite s to (c + gMoons - 1)
else
set gMoons to 0
set the castNum of sprite s to c
end if
-- show this moon in the little window
-- set s to 8
-- if the name of cast (the castNum of sprite s) contains "static" then
-- puppetSprite s, TRUE
-- if theMoons > 0 then
-- set c to getProp(gAttrList,#moonNum)
-- else
-- set c to the number of cast "Moonless"
-- end if
--
-- set the castNum of sprite s to c
-- end if
set gMoonsClicked to TRUE
-- and redraw
decreasePower(2)
updateStage
end if
doFlush()
end if
end