home *** CD-ROM | disk | FTP | other *** search
- property myChan1, myChan2, myChan3, myChan4, myChan5, cast1List, cast2List, cast3List, cast4List, cast5List, colList1, colList2, colList3, colList4, colList5, on1, on2, on3, on4, on5, maxFrames, currFrame
- global theCoord
-
- on birth me, chan1, chan2, chan3, chan4, chan5, layout, visitList
- set myChan1 to chan1
- set myChan2 to chan2
- set myChan3 to chan3
- set myChan4 to chan4
- set myChan5 to chan5
- set the stretch of sprite myChan1 to 0
- set the stretch of sprite myChan2 to 0
- set the stretch of sprite myChan3 to 0
- set the stretch of sprite myChan4 to 0
- set the stretch of sprite myChan5 to 0
- if getPos(visitList, #bedroom) <> 0 then
- set loc to getProp(layout, #bedroom)
- set x to getAt(loc, 1)
- set y to getAt(loc, 2)
- set the locH of sprite myChan1 to x
- set the locV of sprite myChan1 to y
- 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]
- set colList1 to [51, 113, 25, 151, 78, 28, 151, 20, 51, 78, 97, 149, 233, 245, 20]
- set on1 to 1
- set the foreColor of sprite myChan1 to 117
- else
- set on1 to 0
- end if
- if getPos(visitList, #bathroom) <> 0 then
- set loc to getProp(layout, #bathroom)
- set x to getAt(loc, 1)
- set y to getAt(loc, 2)
- set the locH of sprite myChan2 to x
- set the locV of sprite myChan2 to y
- 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]
- set colList2 to [28, 63, 73, 87, 121, 103, 243, 233, 28]
- set on2 to 1
- set the foreColor of sprite myChan2 to 141
- else
- set on2 to 0
- end if
- if getPos(visitList, #kitchen) <> 0 then
- set loc to getProp(layout, #kitchen)
- set x to getAt(loc, 1)
- set y to getAt(loc, 2)
- set the locH of sprite myChan3 to x
- set the locV of sprite myChan3 to y
- 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]
- set colList3 to [72, 53, 79, 75, 71, 75, 79, 63, 71, 85]
- set on3 to 1
- set the foreColor of sprite myChan3 to 244
- else
- set on3 to 0
- end if
- if getPos(visitList, #attic) <> 0 then
- set x to 501
- set y to 90
- set the locH of sprite myChan4 to x
- set the locV of sprite myChan4 to y
- 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]
- set colList4 to [97, 115, 103, 138, 107, 123, 121, 115, 113, 113]
- set on4 to 1
- set the foreColor of sprite myChan4 to 75
- else
- set on4 to 0
- end if
- if getPos(visitList, #lounge) <> 0 then
- set loc to getProp(layout, #lounge)
- set x to getAt(loc, 1)
- set y to getAt(loc, 2)
- set the locH of sprite myChan5 to x
- set the locV of sprite myChan5 to y
- 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]
- set colList5 to [241, 51, 85, 51, 25, 244, 37, 71, 101, 149, 122, 149]
- set on5 to 1
- set the foreColor of sprite myChan5 to 254
- else
- set on5 to 0
- end if
- set currFrame to 1
- set maxFrames to 44
- return me
- end
-
- on Animate me
- if currFrame > maxFrames then
- set currFrame to 1
- end if
- if on1 then
- set the castNum of sprite myChan1 to getAt(cast1List, currFrame)
- end if
- if on2 then
- set the castNum of sprite myChan2 to getAt(cast2List, currFrame)
- end if
- if on3 then
- set the castNum of sprite myChan3 to getAt(cast3List, currFrame)
- end if
- if on4 then
- set the castNum of sprite myChan4 to getAt(cast4List, currFrame)
- end if
- if on5 then
- set the castNum of sprite myChan5 to getAt(cast5List, currFrame)
- end if
- set currFrame to currFrame + 1
- end
-