flipv [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=50907 (Ai generated) a super simple animation function <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>--functionsetup playeranim = 1 timer = 0 function _init() end function animspr(x, y, fps, start_frame, end_frame) timer = timer + 1 if timer &gt;= 30 / fps then playeranim = playeranim + 1 if playeranim &gt; end_frame then playeranim = start_frame end timer = 0 end spr(playeranim, x, y) end function _update() end function _draw() cls() animspr(60, 60, 4, 1, 3) end</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>how this works: animspr(x, y, fps, start_frame, end_frame)</p> https://www.lexaloffle.com/bbs/?tid=144639 https://www.lexaloffle.com/bbs/?tid=144639 Mon, 07 Oct 2024 21:15:28 UTC