home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
A Field Trip to the Sky (Demo)
/
Mac_Sunburst_AFieldTripToTheSky-Demo.iso
/
DIR
/
GAME.DIR
/
00118_Script_doElement
< prev
next >
Wrap
Text File
|
1996-03-27
|
1KB
|
53 lines
global gAttrList
global gPower
global gElementClicked
on mouseDown
if( doButtonPress() ) then
set c to the castNum of sprite the clickOn
set eleNum to (c-75)/2
put eleNum
if( getAt(gElementClicked,eleNum) OR gPower < 17 ) then
-- if they've already been here or have enough, tell em what for
set bOn to getProp(gAttrList,the name of cast c)
set theSoundStub to "AT" & (char 1 to 3 of the name of cast c)
if( bOn = 0) then set theSoundStub to theSoundStub & "N"
doPlaySound( theSoundStub )
else if gPower >= 17 then
-- else bark
doPlaySound( "Power3" )
end if
if ( getAt(gElementClicked,eleNum) = 0 AND gPower < 17 ) then
setAt(gElementClicked,eleNum,1)
decreasePower(1)
updateStage
set s to the clickOn - 11
puppetSprite s, TRUE
set the castNum of sprite s to the number of cast ("Element" && bOn)
--puppetTransition 50, 0, 4, TRUE
updateStage
end if
doFlush()
end if
end