home *** CD-ROM | disk | FTP | other *** search
/ A Virtual Reality Guide to Texas / CD.iso / texdata / arcextra / extras.cst / 00060.ls < prev    next >
Encoding:
Text File  |  1998-06-23  |  1.7 KB  |  65 lines

  1. on songprep
  2.   global songtimed, songframe,songh,songv,puppetlist,lastsong
  3.   
  4.   if the moviename = "tdoc.dir" then
  5.     if (the frame < label("sing")) or ┬¼
  6.      (the frame > (label("sing3") + 1)) then
  7.       set songtimed = true
  8.       set songframe = marker(0)
  9.       set songh = the mouseh
  10.       set songv = the mousev
  11.       
  12.       repeat with i = 3 to 4
  13.         set the visible of sprite i = false
  14.       end repeat
  15.       
  16.       set puppetlist = []
  17.       repeat with i = 1 to 47
  18.         if the puppet of sprite i = true then
  19.           add(puppetlist,i)
  20.           set the visible of sprite i = false
  21.         end if
  22.       end repeat
  23.       
  24.       set songlist = ["sing","sing2","sing3"]
  25.       set dest = lastsong
  26.       repeat while dest = lastsong
  27.         set dest = getat(songlist,random(3))
  28.       end repeat
  29.       set lastsong = dest
  30.       go dest
  31.     end if
  32.   else
  33.     set curloc = marker(0)
  34.     if (curloc < label("sing")) or (curloc > label("help")) then
  35.      
  36.       set songtimed = true
  37.       set songframe = marker(0)
  38.       set songH = the mouseh
  39.       set songv = the mousev
  40.       set the visible of sprite 4 = false
  41.       set the visible of sprite 3 = false
  42.      
  43.       set puppetlist = []
  44.       repeat with i = 1 to 47
  45.         if the puppet of sprite i = true then
  46.           add(puppetlist,i)
  47.           set the visible of sprite i = false
  48.         end if
  49.       end repeat
  50.       
  51.       set songlist = ["sing","sing2","sing3"]
  52.       if voidp(lastsong) then set lastsong = getat(songlist,random(3))
  53.       
  54.       set dest = lastsong
  55.       repeat while dest = lastsong
  56.         set the randomseed = the timer
  57.         set dest = getat(songlist,random(3))
  58.       end repeat
  59.       
  60.       set lastsong = dest
  61.       put "song chosen, old song replaced"
  62.       go dest
  63.     end if
  64.   end if
  65. end