home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / optimus / agata / home.dir / 00005_sparkles.ls < prev    next >
Encoding:
Text File  |  1997-02-20  |  4.2 KB  |  105 lines

  1. property myChan1, myChan2, myChan3, myChan4, myChan5, cast1List, cast2List, cast3List, cast4List, cast5List, colList1, colList2, colList3, colList4, colList5, on1, on2, on3, on4, on5, maxFrames, currFrame
  2. global theCoord
  3.  
  4. on birth me, chan1, chan2, chan3, chan4, chan5, layout, visitList
  5.   set myChan1 to chan1
  6.   set myChan2 to chan2
  7.   set myChan3 to chan3
  8.   set myChan4 to chan4
  9.   set myChan5 to chan5
  10.   set the stretch of sprite myChan1 to 0
  11.   set the stretch of sprite myChan2 to 0
  12.   set the stretch of sprite myChan3 to 0
  13.   set the stretch of sprite myChan4 to 0
  14.   set the stretch of sprite myChan5 to 0
  15.   if getPos(visitList, #bedroom) <> 0 then
  16.     set loc to getProp(layout, #bedroom)
  17.     set x to getAt(loc, 1)
  18.     set y to getAt(loc, 2)
  19.     set the locH of sprite myChan1 to x
  20.     set the locV of sprite myChan1 to y
  21.     set cast1List to [295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338]
  22.     set colList1 to [51, 113, 25, 151, 78, 28, 151, 20, 51, 78, 97, 149, 233, 245, 20]
  23.     set on1 to 1
  24.     set the foreColor of sprite myChan1 to 117
  25.   else
  26.     set on1 to 0
  27.   end if
  28.   if getPos(visitList, #bathroom) <> 0 then
  29.     set loc to getProp(layout, #bathroom)
  30.     set x to getAt(loc, 1)
  31.     set y to getAt(loc, 2)
  32.     set the locH of sprite myChan2 to x
  33.     set the locV of sprite myChan2 to y
  34.     set cast2List to [339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382]
  35.     set colList2 to [28, 63, 73, 87, 121, 103, 243, 233, 28]
  36.     set on2 to 1
  37.     set the foreColor of sprite myChan2 to 141
  38.   else
  39.     set on2 to 0
  40.   end if
  41.   if getPos(visitList, #kitchen) <> 0 then
  42.     set loc to getProp(layout, #kitchen)
  43.     set x to getAt(loc, 1)
  44.     set y to getAt(loc, 2)
  45.     set the locH of sprite myChan3 to x
  46.     set the locV of sprite myChan3 to y
  47.     set cast3List to [383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426]
  48.     set colList3 to [72, 53, 79, 75, 71, 75, 79, 63, 71, 85]
  49.     set on3 to 1
  50.     set the foreColor of sprite myChan3 to 244
  51.   else
  52.     set on3 to 0
  53.   end if
  54.   if getPos(visitList, #attic) <> 0 then
  55.     set x to 501
  56.     set y to 90
  57.     set the locH of sprite myChan4 to x
  58.     set the locV of sprite myChan4 to y
  59.     set cast4List to [427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470]
  60.     set colList4 to [97, 115, 103, 138, 107, 123, 121, 115, 113, 113]
  61.     set on4 to 1
  62.     set the foreColor of sprite myChan4 to 75
  63.   else
  64.     set on4 to 0
  65.   end if
  66.   if getPos(visitList, #lounge) <> 0 then
  67.     set loc to getProp(layout, #lounge)
  68.     set x to getAt(loc, 1)
  69.     set y to getAt(loc, 2)
  70.     set the locH of sprite myChan5 to x
  71.     set the locV of sprite myChan5 to y
  72.     set cast5List to [471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514]
  73.     set colList5 to [241, 51, 85, 51, 25, 244, 37, 71, 101, 149, 122, 149]
  74.     set on5 to 1
  75.     set the foreColor of sprite myChan5 to 254
  76.   else
  77.     set on5 to 0
  78.   end if
  79.   set currFrame to 1
  80.   set maxFrames to 44
  81.   return me
  82. end
  83.  
  84. on Animate me
  85.   if currFrame > maxFrames then
  86.     set currFrame to 1
  87.   end if
  88.   if on1 then
  89.     set the castNum of sprite myChan1 to getAt(cast1List, currFrame)
  90.   end if
  91.   if on2 then
  92.     set the castNum of sprite myChan2 to getAt(cast2List, currFrame)
  93.   end if
  94.   if on3 then
  95.     set the castNum of sprite myChan3 to getAt(cast3List, currFrame)
  96.   end if
  97.   if on4 then
  98.     set the castNum of sprite myChan4 to getAt(cast4List, currFrame)
  99.   end if
  100.   if on5 then
  101.     set the castNum of sprite myChan5 to getAt(cast5List, currFrame)
  102.   end if
  103.   set currFrame to currFrame + 1
  104. end
  105.