yot1337 [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=38190 how do I draw a sprite an exact number of times? <p>hello, I'd like to know if anyone can help me. I wanted to make a bomb sprite appear 6 times on 6 random places on the screen (except a border that I made), so I made a function for that:</p> <div> <div style="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>function randombomb() for i = 1,6 do spr(4,rnd(104)+8,rnd(104)+8) end 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>I called this function in the _DRAW loop function, which was a mistake because the screen turned into a one big chaotic mess...</p> <p>if it wasn't clear, I want the function to happen only <strong>1</strong> time and not infinitely. can anyone please help me?</p> https://www.lexaloffle.com/bbs/?tid=34616 https://www.lexaloffle.com/bbs/?tid=34616 Mon, 01 Jul 2019 18:54:46 UTC