home *** CD-ROM | disk | FTP | other *** search
- on initdemo
- global gheadlist, gbodylist, gleglist, gslt, glpr, glpl
- set gheadlist to [14, 15, 16, 17]
- set gbodylist to [18, 19, 20, 21]
- set gleglist to [22, 23, 24, 25]
- set gslt to [2, 1, 1, 2, 3, 3, 0, 1]
- set glpr to [1, 0, 0, 0, 2, 0, 0, 0]
- set glpl to [2, 0, 0, 0, 1, 0, 0, 0]
- repeat with i = 14 to 29
- set the puppet of sprite i to 1
- end repeat
- end
-
- on cleardemo
- repeat with i = 1 to 6
- set the puppet of sprite i to 0
- end repeat
- repeat with i = 14 to 29
- set the puppet of sprite i to 0
- end repeat
- end
-
- on lampdemo
- global glpr, glpl
- set glpr to updemo(1, glpr)
- set glpl to updemo(2, glpl)
- end
-
- on updemo i, list
- set k to 13
- if i = 2 then
- set k to 21
- end if
- set l to getAt(list, 1)
- repeat with j = 2 to 8
- setAt(list, j - 1, getAt(list, j))
- end repeat
- setAt(list, 8, l)
- repeat with j = 1 to 8
- set the castNum of sprite (k + j) to getAt(list, j) + 28
- end repeat
- return list
- end
-
- on movedemo
- global gheadlist, gbodylist, gleglist
- updatedemo(1, gheadlist)
- updatedemo(2, gbodylist)
- updatedemo(3, gleglist)
- updateStage()
- end
-
- on updatedemo i, list
- global gslt
- set i to i * 2
- set j to getAt(gslt, i - 1)
- set k to getAt(gslt, i)
- if j <> 1 then
- if j = 0 then
- setAt(gslt, i - 1, 3)
- set j to 3
- set k to k + 1
- if k > 4 then
- set k to 1
- end if
- setAt(gslt, i, k)
- else
- setAt(gslt, i - 1, j - 1)
- end if
- set l to k - 1
- if l < 1 then
- set l to 4
- end if
- set the castNum of sprite (i - 1) to getAt(list, l)
- set the locH of sprite (i - 1) to 295 - ((4 - j) * 18)
- set the castNum of sprite i to getAt(list, k)
- set the locH of sprite i to 295 + (j * 18)
- else
- setAt(gslt, i - 1, 0)
- set the castNum of sprite (i - 1) to getAt(list, k)
- set the locH of sprite (i - 1) to 295
- set the castNum of sprite i to getAt(list, k)
- set the locH of sprite i to 295
- end if
- end
-