home *** CD-ROM | disk | FTP | other *** search
- on startAnimaList whichAnimation, whichSprite
- global gCurrAnimaList, gCurrAnima, gAnimationNow, gWhichAnimationSprite
- set gWhichAnimationSprite to whichSprite
- clearAnimalist()
- updateStage()
- set gAnimationNow to 1
- set gCurrAnimaList to whichAnimation
- end
-
- on advanceAnimaList
- global gCurrAnimaList, gCurrAnima, gWhichAnimationSprite, gFdbkLst
- set gCurrAnima to gCurrAnima + 1
- if (gCurrAnimaList <> []) and (gCurrAnima <= count(gCurrAnimaList)) then
- set the memberNum of sprite gWhichAnimationSprite to the number of member getAt(gCurrAnimaList, gCurrAnima)
- updateStage()
- if (getAt(gCurrAnimaList, gCurrAnima) = "bear 1 good 18") or (getAt(gCurrAnimaList, gCurrAnima) = "bear 1 bad 18") then
- startSndList(gFdbkLst)
- set gFdbkLst to []
- else
- if (getAt(gCurrAnimaList, 1) contains "good") or (getAt(gCurrAnimaList, 1) contains "bad") then
- if not soundBusy(2) and (gCurrAnima >= 5) and (gCurrAnima < 15) then
- set whichFart to random(14)
- puppetSound(2, "fart" & whichFart)
- end if
- else
- if (getAt(gCurrAnimaList, 1) contains "paint") and not soundBusy(2) then
- if (gCurrAnima >= 21) and (gCurrAnima < 45) then
- set whichFart to random(14)
- puppetSound(2, "fart" & whichFart)
- end if
- end if
- end if
- end if
- else
- clearAnimalist()
- end if
- end
-
- on clearAnimalist
- global gCurrAnimaList, gCurrAnima, gAnimationNow, gWhichAnimationSprite, gBridgeParts
- set gAnimationNow to 0
- if the frameLabel = "chooser" then
- set the memberNum of sprite gWhichAnimationSprite to the number of member "bear m rest" of castLib "bear"
- else
- if the frameLabel = "bridge" then
- if gBridgeParts = 10 then
- set the memberNum of sprite gWhichAnimationSprite to the number of member "bear 1 fin 1" of castLib "bear"
- else
- set the memberNum of sprite gWhichAnimationSprite to the number of member "bear paint 1" of castLib "bear"
- end if
- else
- set the memberNum of sprite gWhichAnimationSprite to the number of member "bear rest" of castLib "bear"
- end if
- end if
- unloadMember(member "bear rest", "bear 1 fin 20")
- set gCurrAnimaList to []
- set gCurrAnima to 0
- end
-
- on idleBear
- global gBear, gBridgeParts
- set tempLst to []
- if the frameLabel = "chooser" then
- set whichIdle to random(7)
- case whichIdle of
- "1", "4", "5":
- set howMany to 19
- set whichIdle to 1
- "2":
- set howMany to 20
- "3", "6", "7":
- set howMany to 20
- set whichIdle to 3
- end case
- repeat with X = 1 to howMany
- add(tempLst, "bear" && whichIdle & "m" && "idle " & X)
- end repeat
- else
- if the frameLabel = "bridge" then
- if gBridgeParts = 10 then
- set howMany to 20
- repeat with X = 1 to howMany
- add(tempLst, "bear 1 fin " & X)
- end repeat
- else
- set howMany to 45
- repeat with X = 1 to howMany
- add(tempLst, "bear paint " & X)
- end repeat
- end if
- else
- set whichIdle to random(7)
- case whichIdle of
- "1", "4", "5", "6", "7":
- set howMany to 20
- set whichIdle to 1
- "2":
- set howMany to 20
- "3":
- set howMany to 20
- end case
- repeat with X = 1 to howMany
- add(tempLst, "bear" && whichIdle && "idle " & X)
- end repeat
- end if
- end if
- startAnimaList(tempLst, gBear)
- end
-
- on fillBearsTime
- idleBear()
- end
-