home *** CD-ROM | disk | FTP | other *** search
/ Creative Review 28 / Creative-Review-CD-ROM-28.iso / pc / kungfu / style.dir / 00005_Script_5 < prev    next >
Text File  |  1997-08-08  |  1KB  |  64 lines

  1. -- figure Anim
  2.  
  3.  
  4. global gFigList
  5. global gFigEntry
  6.  
  7.  
  8. on hinitFigure
  9.   
  10.   set gFigEntry = 1
  11.   
  12.   set   gFigList = []
  13.   
  14.   set basein = 0
  15.   
  16.   
  17.   
  18.   repeat with a = 2 to the number of lines in field "figure data"
  19.     
  20.     set currentlist = [:]
  21.     addprop currentlist , #chan , the value of word 1 of line a of field "figure data"
  22.     addprop currentlist , #in , the value of word 2 of line a of field "figure data"
  23.     addprop currentlist , #out , the value of word 3 of line a of field "figure data"
  24.     
  25.     add gFigList currentlist
  26.   end repeat
  27.   
  28.   repeat with a = 1 to count (gFigList)
  29.     set currentList = getat (gFigList,a)
  30.     
  31.     set Thechan = the chan of currentList
  32.     set TheIn = the in of currentList
  33.     
  34.     puppetsprite Thechan,true
  35.     
  36.     set the castNum of sprite thechan to theIn + basein
  37.     set the loch of sprite thechan to    560
  38.     
  39.     set basein = basein + 1
  40.     
  41.   end repeat
  42.   
  43.   
  44. end
  45.  
  46.  
  47. on hupdateFigure
  48.   
  49.   set currentList = getat (gFigList,gFigEntry)
  50.   
  51.   set Thechan = the chan of currentList
  52.   set TheOut = the out of currentList
  53.   
  54.   set the castNum of sprite Thechan to  the castNum of sprite Thechan + 1
  55.   
  56.   if the  castNum of sprite Thechan > TheOut then
  57.     set TheIn = the in of currentList
  58.     set the castNum of sprite Thechan to theIn
  59.   end if
  60.   
  61.   set gFigEntry = gFigEntry + 1
  62.   
  63.   if gFigEntry > count(gFigList) then   set gFigEntry = 1
  64. end