home *** CD-ROM | disk | FTP | other *** search
- global gbunnyup, gmyRadio, gheadstoneUp, gOpSys, DELIMITER, CDDrive, gHeadstoneSprite, gheadstonestart, gGroup1L, gGroup2L, gGroup3L, gGroup4L, gGroup1R, gGroup2R, gGroup3R, gGroup4R, gListL, gListR, gfirstout, gstartframe, gIgnoreGroup
-
- on startMovie
- if voidp(CDDrive) then
- if the machineType = 256 then
- set DELIMITER to "\"
- set CDDrive to getCDdrive()
- set gOpSys to #WIN
- else
- set DELIMITER to ":"
- set CDDrive to "blender5"
- set gOpSys to #MAC
- end if
- end if
- initstuff()
- rubberpreLoad()
- set gHeadstoneSprite to 31
- pass()
- end
-
- on rubberpreLoad
- preLoad("preStart", "preStop")
- end
-
- on stopMovie
- nothing()
- end
-
- on initstuff
- put 0 into field "miss"
- put 0 into field "hits"
- set gmyRadio to EMPTY
- set the volume of sound 1 to 200
- set the volume of sound 2 to 200
- set the volume of sound 3 to 256
- puppetSprite(4, 0)
- end
-
- on startGame
- initstuff()
- repeat with x = 5 to 20
- set the visible of sprite x to 0
- end repeat
- makeLists()
- set the visible of sprite 6 to 1
- set the visible of sprite 7 to 1
- set gfirstout to 1
- set the volume of sound 3 to 256
- go("loop1")
- setCurs()
- set the volume of sound 1 to 200
- set the volume of sound 2 to 200
- end
-
- on makeLists
- set gGroup1L to list(5, 7)
- set gGroup2L to list(9, 11)
- set gGroup3L to list(13, 15)
- set gGroup4L to list(17, 19)
- set gGroup1R to list(6, 8)
- set gGroup2R to list(10, 12)
- set gGroup3R to list(14, 16)
- set gGroup4R to list(18, 20)
- set gListL to list(gGroup1L, gGroup2L, gGroup3L, gGroup4L)
- set gListR to list(gGroup1R, gGroup2R, gGroup3R, gGroup4R)
- end
-
- on setCurs
- set the cursor of sprite 4 to [member "ch1", member "ch1mask"]
- repeat with x = 33 to 48
- if (x = 40) or (x = 41) or (x = 42) or (x = 43) or (x = 45) then
- nothing()
- next repeat
- end if
- set the cursor of sprite x to [member "hand", member "hand mask"]
- end repeat
- end
-
- on visibleBunnies
- howmanyleft()
- set what to random(2)
- if what > 1 then
- exit
- end if
- if gfirstout then
- exit
- end if
- set whichR to random(2)
- set whichL to random(2)
- if whichR = 1 then
- set otherR to 2
- else
- set otherR to 1
- end if
- if whichL = 1 then
- set otherL to 2
- else
- set otherL to 1
- end if
- set whichNum to char the number of chars in gstartframe of gstartframe
- set whichNum to integer(whichNum)
- if whichNum > count(gListR) then
- exit
- end if
- set myListL to getAt(gListL, whichNum)
- set myListR to getAt(gListR, whichNum)
- set visibleL to getAt(myListL, whichL)
- set visibleR to getAt(myListR, whichR)
- set invisibleL to getAt(myListL, otherL)
- set invisibleR to getAt(myListR, otherR)
- set the visible of sprite invisibleL to 0
- set the visible of sprite invisibleR to 0
- set the visible of sprite visibleL to 1
- set the visible of sprite visibleR to 1
- end
-
- on bunnyUp
- set gbunnyup to 1
- puppetSound(1, "squeal")
- set whichBunny to random(3)
- set offset to 104
- case whichBunny of
- 1:
- puppetSprite(8, 1)
- set the locH of sprite 8 to 143 + offset + random(154)
- 2:
- puppetSprite(9, 1)
- set the locH of sprite 9 to 70 + offset + random(307)
- 3:
- puppetSprite(10, 1)
- set the locH of sprite 10 to 43 + offset + random(348)
- end case
- end
-
- on bunnydown
- set gheadstoneUp to 1
- repeat with i = 8 to 10
- set the locH of sprite i to -100
- set the member of sprite i to member ("bunny" && i - 7)
- puppetSprite(i, 0)
- end repeat
- unPuff()
- end
-
- on kill theBunny
- if not gbunnyup then
- exit
- end if
- set gbunnyup to 0
- puppetSound(1, "hurt")
- set theSprite to the clickOn
- case theBunny of
- 1:
- set points to 1
- 2:
- set points to 1
- 3:
- set points to 1
- set theSprite to 10
- end case
- set the member of sprite theSprite to member ("splat" && theBunny)
- updateStage()
- addtoHit(points)
- end
-
- on bury theCorpse
- puppetSound(1, "hurt")
- puppetSprite(gHeadstoneSprite, 1)
- set theSprite to the clickOn
- set the visible of sprite the clickOn to 0
- set the loc of sprite gHeadstoneSprite to the loc of sprite the clickOn
- updateStage()
- set points to 1
- addtoHit(points)
- end
-
- on howmanyleft
- put field "miss" into field "sm"
- put field "hits" into field "sh"
- if (field "sh" >= 21) and (count(gListL) > 3) then
- deleteAt(gListL, 4)
- deleteAt(gListR, 4)
- end if
- end
-
- on puff
- puppetSound(2, 0)
- puppetSound(2, "puff")
- addtoMiss()
- set gheadstoneUp to the ticks
- end
-
- on missed
- end
-
- on airshot
- puppetSound(2, 0)
- puppetSound(2, "puff")
- addtoMiss()
- end
-
- on addtoMiss
- put integer(field "miss") + 1 into field "miss"
- checkDone()
- end
-
- on addtoHit points
- put integer(field "hits") + points into field "hits"
- checkDone()
- end
-
- on checkDone
- if (field "hits" > 24) or ((field "miss" + field "hits") >= 50) then
- put field "miss" into field "sm"
- put field "hits" into field "sh"
- startTimer()
- nopuppets()
- resetsprites()
- set the volume of sound 1 to 256
- set the volume of sound 2 to 256
- go("booth")
- end if
- end
-
- on shutup
- repeat with x = 1 to 8
- sound stop x
- end repeat
- end
-
- on loseheadstone
- if (the ticks - gheadstonestart) > 60 then
- set the loc of sprite gHeadstoneSprite to point(0, -200)
- updateStage()
- end if
- end
-
- on turnTheKnob
- if the mouseDown then
- puppetSprite(39, 1)
- set the castNum of sprite 39 to cast "radioPotLoop1"
- set the ink of sprite 39 to 8
- updateStage()
- else
- nothing()
- end if
- end
-
- on nopuppets
- repeat with i = 1 to 48
- puppetSprite(i, 0)
- end repeat
- end
-
- on puppetsOff
- nopuppets()
- end
-
- on resetsprites
- repeat with x = 1 to 48
- set the visible of sprite x to 1
- end repeat
- end
-
- on resetCursors
- repeat with x = 1 to 48
- set the cursor of sprite x to -1
- end repeat
- end
-
- on exitGame
- resetCursors()
- resetsprites()
- nopuppets()
- go("OPEN", "CONTENTS.DIR")
- end
-