home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 1998 #13 / Skiva nr 13-1998 (Svart).iso / nksdemo.exe / skepp.dxr / 00140.ls < prev    next >
Encoding:
Text File  |  1998-10-02  |  693 b   |  23 lines

  1. on shipIntoWater
  2.   global skepp, hv, rightShip, leftShip, skeppSlump
  3.   repeat with i = 1 to 4
  4.     if not getAt(skepp, i) then
  5.       set startSkepp to random(1000)
  6.       if startSkepp > skeppSlump then
  7.         setAt(skepp, i, 1)
  8.         set riktning to random(2)
  9.         case riktning of
  10.           1:
  11.             setAt(hv, i, 1)
  12.             set the locH of sprite ((i * 3) + 2) to -40
  13.             set the memberNum of sprite ((i * 3) + 2) to getAt(rightShip, i)
  14.           2:
  15.             setAt(hv, i, -1)
  16.             set the locH of sprite ((i * 3) + 2) to 680
  17.             set the memberNum of sprite ((i * 3) + 2) to getAt(leftShip, i)
  18.         end case
  19.       end if
  20.     end if
  21.   end repeat
  22. end
  23.