home *** CD-ROM | disk | FTP | other *** search
/ Oz - The Magical Adventure / Adventure.iso / pc / dkdata / juice.dxr / Internal_10_loadJuice.ls < prev    next >
Encoding:
Text File  |  2000-06-01  |  883 b   |  24 lines

  1. on exitFrame
  2.   global gFrameCounter, gGameState, gMasterMoves, gGameSol
  3.   gFrameCounter = gFrameCounter + 1
  4.   whichItem = value(char 1 of item 4 of gGameSol)
  5.   HowMuch = value(item whichItem of gGameSol)
  6.   if gFrameCounter > 6 then
  7.     if item whichItem of gGameState < HowMuch then
  8.       whichFruit = char 1 to 5 of the name of the member of sprite(whichItem + 19)
  9.       currentState = value(char 6 to 7 of the name of the member of sprite(whichItem + 19))
  10.       currentState = min(currentState + 1, 9)
  11.       sprite(whichItem + 19).member = whichFruit & "0" & string(currentState)
  12.       oldValue = value(item whichItem of gGameState)
  13.       put oldValue + 1 into item whichItem of gGameState
  14.       puppetSound("click" & string(random(5)))
  15.     end if
  16.     gFrameCounter = 0
  17.   end if
  18.   if item whichItem of gGameState < HowMuch then
  19.     go(the frame)
  20.   else
  21.     go("play")
  22.   end if
  23. end
  24.