home *** CD-ROM | disk | FTP | other *** search
/ 15 Beaut Aussie Games 1 / BEAUTGAMESV1.iso / pc / Windows / data1.cab / Program_Files / dswmedia / games / canetoad.dcr / gameControl_17.ls < prev    next >
Encoding:
Text File  |  2002-01-01  |  2.2 KB  |  99 lines

  1. on saveIcon whichOne
  2.   global swagString, online, standalone
  3.   if online and not standalone then
  4.     readPrefs()
  5.     swagString = swagString & "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN"
  6.     temp = EMPTY
  7.     repeat with i = 1 to 30
  8.       if i = whichOne then
  9.         temp = temp & "Y"
  10.         next repeat
  11.       end if
  12.       temp = temp & char i of swagString
  13.     end repeat
  14.     swagString = temp
  15.     writePrefs()
  16.   end if
  17. end
  18.  
  19. on goWalkabout
  20.   global gameControl, worldCoords, level
  21.   case level of
  22.     1:
  23.       readPrefs()
  24.       worldCoords = point(1000, 300)
  25.       writePrefs()
  26.       gotoNetMovie("lworld.dcr")
  27.     2:
  28.       worldCoords = point(1000, -300)
  29.       writePrefs()
  30.       gotoNetMovie("lworld.dcr")
  31.     3:
  32.       worldCoords = point(1000, -600)
  33.       writePrefs()
  34.       gotoNetMovie("lworld.dcr")
  35.     4:
  36.       worldCoords = point(1000, -1000)
  37.       writePrefs()
  38.       gotoNetMovie("pub.dcr")
  39.     otherwise:
  40.       gotoNetMovie("lworld.dcr")
  41.   end case
  42.   go("loading")
  43. end
  44.  
  45. on loadWait
  46.   repeat with i = 1 to 48
  47.     set the visible of sprite i to 0
  48.   end repeat
  49.   go(the frame)
  50. end
  51.  
  52. on writePrefs
  53.   global worldCoords, swagString, yourName, standalone
  54.   if not standalone then
  55.     SetPref("lworld97", yourName & "," & getAt(worldCoords, 1) & "," & getAt(worldCoords, 2) & "," & swagString)
  56.   end if
  57. end
  58.  
  59. on readPrefs
  60.   global beenHere, worldCoords, swagString, yourName, standalone
  61.   if not standalone then
  62.     worldCoords = point(0, 0)
  63.     if voidp(getPref("lworld97")) then
  64.       beenHere = 0
  65.       case random(9) of
  66.         1:
  67.           yourName = "Wally"
  68.         2:
  69.           yourName = "Digger"
  70.         3:
  71.           yourName = "Bluey"
  72.         4:
  73.           yourName = "Bruce"
  74.         5:
  75.           yourName = "Kev"
  76.         6:
  77.           yourName = "Cobber"
  78.         7:
  79.           yourName = "Matey"
  80.         8:
  81.           yourName = "Macca"
  82.         9:
  83.           yourName = "Bazza"
  84.         otherwise:
  85.           yourName = "Mel"
  86.       end case
  87.     else
  88.       beenHere = 1
  89.       tempList = []
  90.       the itemDelimiter = ","
  91.       tempList = getPref("lworld97")
  92.       yourName = item 1 of tempList
  93.       setAt(worldCoords, 1, integer(item 2 of tempList))
  94.       setAt(worldCoords, 2, integer(item 3 of tempList))
  95.       swagString = item 4 of tempList
  96.     end if
  97.   end if
  98. end
  99.