home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
A Field Trip to the Sky (Demo)
/
Mac_Sunburst_AFieldTripToTheSky-Demo.iso
/
DIR
/
GAME.DIR
/
00120_Script_doChoosePlanet
< prev
next >
Wrap
Text File
|
1996-03-27
|
2KB
|
61 lines
on mouseDown
global gAttrList, gTries
if( doButtonPress() ) then
-- are we asking or transmitting?
set whichName to the name of cast (the castNum of sprite (the clickOn))
-- what planet do we have?
set theId to char 1 to 2 of getProp(gAttrList,#name)
if whichName contains "radio" then
-- play the transmit sound
doPlaySound "transloc"
-- set up the transmit button
set s to the clickOn
puppetSprite s, TRUE
set the castNum of sprite s to the number of cast "Transmit Up"
puppetSprite s, FALSE
-- set up the planet chooser
set s to 8
puppetSprite s, TRUE
set the castNum of sprite s to the number of cast "meyes.pict"
puppetSprite s, FALSE
-- show the arrows
spriteShow 45
spriteShow 46
set gTries to 0
else if whichName contains "transmit" then
set gTries to gTries + 1
-- check if we're right
set theName to char 1 to 2 of the name of cast (the castNum of sprite 8)
if theName = char 1 to 2 of getProp(gAttrList,#name) then
-- we're right
doPlaySeries( (theId & "right"), "help", "", FALSE, TRUE )
go to frame "Reset"
else if gTries = 1 OR gTries = 2 then
-- we're wrong, but in first two guesses
doPlaySeries( (theName & "wrong1"), "check", "", FALSE, TRUE )
else
-- we've been wrong for a while
doPlaySeries( "luck", (theId & "wrong2"), "help", FALSE, TRUE )
go to frame "Reset"
end if
end if
end if
doFlush()
end