home *** CD-ROM | disk | FTP | other *** search
- global grun, gh, gjump, gaction, ghard, gscore
-
- on initialize
- set grun to 0
- set gjump to 0
- set gaction to 0
- set ghard to 0
- set gscore to 0
- set gh to the locH of sprite 10
- set the puppet of sprite 10 to 1
- end
-
- on running
- set grun to (grun + 1) mod 4
- set the castNum of sprite 10 to the number of cast "run" + grun
- updateStage()
- end
-
- on runnermove
- set grun to (grun + 1) mod 4
- set the castNum of sprite 10 to the number of cast "run" + grun
- set gh to gh - 16
- set the locH of sprite 10 to gh
- updateStage()
- end
-
- on jumping
- set gjump to (gjump + 1) mod 4
- set the castNum of sprite 10 to the number of cast "jump" + gjump
- updateStage()
- if gaction = 4 then
- set gaction to 0
- else
- set gaction to gaction + 1
- end if
- end
-
- on motion
- if gaction = 1 then
- jumping()
- else
- if gaction = 2 then
- jumping()
- else
- if gaction = 3 then
- jumping()
- else
- if gaction = 4 then
- jumping()
- else
- running()
- end if
- end if
- end if
- end if
- end
-
- on goalmotion
- if gaction = 1 then
- jumping()
- else
- if gaction = 2 then
- jumping()
- else
- if gaction = 3 then
- jumping()
- else
- if gaction = 4 then
- jumping()
- else
- runnermove()
- end if
- end if
- end if
- end if
- end
-
- on korobu
- if sprite 10 intersects 3 then
- puppetSound("ooh")
- set grun to 0
- go("oh")
- end if
- end
-
- on korobu2
- if sprite 10 intersects 3 then
- puppetSound("ooh")
- set grun to 0
- go("oh2")
- end if
- end
-
- on tokuten
- global ghitoketa, gfutaketa
- if gscore < 10 then
- put 0 & gscore into field "tensu"
- else
- put gscore into field "tensu"
- end if
- puppetSprite(5, 1)
- puppetSprite(6, 1)
- set ghitoketa to char 1 of field "tensu"
- set gfutaketa to char 2 of field "tensu"
- set the castNum of sprite 5 to ghitoketa + 100
- set the castNum of sprite 6 to gfutaketa + 100
- updateStage()
- end
-