home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magazine 28 Bonus / CDRomMagazine-SoftKey-ArtPassion-FrenchVersion-Win31Mac.bin / data / cngrkpl.dir / 00130_Script_130 < prev    next >
Text File  |  1996-05-30  |  1KB  |  59 lines

  1. on setTimer
  2.   timeOutOff
  3.   global allotedSeconds
  4.   put 40 into allotedSeconds
  5.   
  6.   global gameStartTicks
  7.   put the ticks into gameStartTicks
  8.   set the text of cast "GameTimer" to string(allotedSeconds) 
  9.   
  10. end 
  11.  
  12.  
  13. on updateTimer
  14.   global gameStartTicks, allotedSeconds, gameOver
  15.   put allotedSeconds - ((the ticks - gameStartTicks) / 60) into gameSecondsRemain
  16.   set the text of cast "GameTimer" to string(gameSecondsRemain)
  17.   put false into gameOver
  18.   if gameSecondsRemain <= 0 then
  19.     put true into gameOver
  20.     gameOutOfTime
  21.   end if
  22.   
  23. end
  24.  
  25.  
  26.  
  27.  
  28. on gameOutOfTime
  29.   global totalPlaced
  30.   endGeoGame
  31.   if totalPlaced < 10 then
  32.     puppetSound "bad"
  33.     updateStage
  34.   else
  35.     puppetSound "good"
  36.     updateStage
  37.   end if
  38.   
  39.   
  40.   go frame "CNGrkPlSt1"
  41. end
  42.  
  43.  
  44. on endGeoGame
  45.   global firstPlacedOutline,lastPlacedOutline
  46.   repeat with i = (firstPlacedOutline - 1) to lastPlacedOutline
  47.     puppetSprite i, FALSE
  48.   end repeat
  49.   when mouseDown then nothing
  50. end
  51.  
  52.  
  53. on success
  54.   endGeoGame
  55.   puppetSound "success"
  56.   updateStage
  57.   go frame "CNGrkPlSt1"
  58.   
  59. end