Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Gate = Graphics.loadImage("Gate.png")
- local Star = Graphics.loadImage("Star.png")
- local animTimer = 0
- local timeractive = false
- local frameCounter = 0
- local waitFrame = 0
- local timerTotal = 88
- local frameRate = 8
- local iframe = 0
- local StarAnimtimer = 0
- local Stariframe = 0
- mem(0x00B251E0, FIELD_WORD, 9)
- local draw = false
- function onStart()
- end
- function onTick()
- staranimater()
- for i,warp in ipairs(Warp.get()) do
- Text.print(tostring(warp:mem(0x12, FIELD_WORD)), 20*i, 40*i)
- if mem(0x00B251E0, FIELD_WORD) ~= warp:mem(0x12, FIELD_WORD) then
- draw = true
- end
- end
- Text.print(tostring(iframe), 100*i, 100*i)
- Text.print(tostring(mem(0x00B251E0, FIELD_WORD)), 20, 80)
- animate()
- if player:mem(0x122,FIELD_WORD) == 7 then
- timeractive = true
- end
- if timeractive then
- animTimer = animTimer + 1
- waitFrame = waitFrame + 1
- if waitFrame >= 65 then
- frameCounter = frameCounter + 1
- waitFrame = 0
- end
- end
- --for i,star in ipairs(BGO.get()) do
- -- Text.print(tostring(star.id), 20*i, 10*i)
- -- --star.width = 48
- -- --star.height = 48
- --end
- end
- function animate()
- if animTimer == timerTotal - frameRate * frameCounter then
- iframe = frameCounter
- end
- --if animTimer == timerTotal - Framerate * 11 then
- -- iframe = 0
- --end
- --if animTimer == timerTotal - Framerate * 10 then
- -- iframe = 1
- --end
- --if animTimer == timerTotal - Framerate * 9 then
- -- iframe = 2
- --end
- --if animTimer == timerTotal - Framerate * 8 then
- -- iframe = 3
- --end
- --if animTimer == timerTotal - Framerate * 7 or animTimer == timerTotal - Framerate * 6 or animTimer == timerTotal - Framerate * 5 or animTimer == timerTotal - Framerate * 4 then
- -- iframe = 4
- --end
- --if animTimer == timerTotal - Framerate * 3 then
- -- iframe = 3
- --end
- --if animTimer == timerTotal - Framerate * 2 then
- -- iframe = 2
- --end
- --if animTimer == timerTotal - Framerate * 1 then
- -- iframe = 1
- --end
- --if animTimer == timerTotal then
- -- iframe = 0
- -- timeractive = false
- -- animTimer = 0
- --end
- end
- function staranimater()
- StarAnimtimer = StarAnimtimer + 1
- if StarAnimtimer == 8 then
- Stariframe = Stariframe + 1
- StarAnimtimer = 0
- if Stariframe == 3 then
- Stariframe = 0
- end
- end
- end
- function onDraw()
- Graphics.drawImageToSceneWP(Gate, -199758, -200448, 0, 352 * iframe, 316, 352, -85.0)
- if draw then
- Graphics.drawImageToSceneWP(Star, -199658, -200256, 0, 80 * Stariframe, 116, 80, -80.0)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement