home *** CD-ROM | disk | FTP | other *** search
- on movesonic
- global gdir, gcha, gdirt, gicec, gtime, gnin
- if gtime = 0 then
- set j to abs(random(gnin + 1) - 1) * 16
- set m to random(20 - gnin)
- if gdir = 0 then
- set i to the left of sprite 9 - 10
- if (i > (0 + j)) and (m <> 7) then
- set gcha to the number of cast "SONIC-3"
- set the castNum of sprite 9 to gcha
- if gicec > 1 then
- if gdirt < the ticks then
- set gdirt to the ticks + 5
- set gdir to 1
- set the locH of sprite 9 to the locH of sprite 9 - 18
- end if
- else
- set the locH of sprite 9 to the locH of sprite 9 - 10
- end if
- else
- if i <= (0 + j) then
- set gdir to 1
- set gcha to the number of cast "SONIC-1"
- set the castNum of sprite 9 to gcha
- set i to 0 + j - the left of sprite 9
- set the locH of sprite 9 to the locH of sprite 9 + i
- else
- set gdir to 1
- set gcha to the number of cast "SONIC-1"
- set the castNum of sprite 9 to gcha
- end if
- end if
- else
- set i to the left of sprite 9 + 10
- if (i < (372 - j)) and (m <> 7) then
- set gcha to the number of cast "SONIC-1"
- set the castNum of sprite 9 to gcha
- if gicec > 1 then
- if gdirt < the ticks then
- set gdirt to the ticks + 5
- set gdir to 0
- set the locH of sprite 9 to the locH of sprite 9 + 20
- end if
- else
- set the locH of sprite 9 to the locH of sprite 9 + 10
- end if
- else
- if i >= (372 - j) then
- set gdir to 0
- set gcha to the number of cast "SONIC-3"
- set the castNum of sprite 9 to gcha
- set i to 362 - j - the left of sprite 9
- set the locH of sprite 9 to the locH of sprite 9 + i
- else
- set gdir to 0
- set gcha to the number of cast "SONIC-3"
- set the castNum of sprite 9 to gcha
- end if
- end if
- end if
- if gicec = 2 then
- set gcha to the number of cast "SONIC-4"
- set the castNum of sprite 9 to gcha
- set the ink of sprite 9 to 4
- else
- if gicec < 2 then
- set the ink of sprite 9 to 0
- else
- if gicec = 3 then
- set gtime to the ticks + (3 * 60)
- puppetSound("KAKIN")
- set the visible of sprite 47 to 1
- set the castNum of sprite 9 to the number of cast "SONIC-6"
- set the ink of sprite 9 to 0
- end if
- end if
- end if
- else
- if gtime < the ticks then
- go(#next)
- end if
- end if
- end
-